3 ms·
I like to view pids as a special case of a channel. A pid is just the one-and-only channel of a process, and a process cannot create more. If I'm not mistaken,
by arnarbi 13y ago
I like to view pids as a special case of a channel. A pid is just the one-and-only channel of a process, and a process cannot create more. If I'm not mistaken, Erlang advocates creating processes for very specific tasks, so most of the time one channel is enough. But if you ever find yourself writing processes that check the "type" of an incoming message and dispatch that to different handlers, then consider if it could be easier if each message type came in on a different channel.
The security implications of channels are neat too, you can treat them as capabilities to specific parts of a process' API.