2 ms·
Yes, Erlang is based more on the actor model. CSP is synchronous, so sending to a channel will block if the receiver isn't ready. Erlang and actors are asynchr
by Jtsummers 5y ago
Yes, Erlang is based more on the actor model.
CSP is synchronous, so sending to a channel will block if the receiver isn't ready. Erlang and actors are asynchronous in this matter. They will send regardless of whether the receiver is in a state where it can receive the message. Practically, Go (and libmill) allow buffered channels so that you only block if the channel's buffer is full.
CSP is based on anonymous processes. Actors have identity, and this would be the process IDs in Erlang. Erlang and the actor model don't use channels (though you can use processes to mimic them).
- masklinn 5y ago> Practically, Go (and libmill) allow buffered channels so that you only block if the channel's buffer is full. Go also allows rendezvous channel (channels with an empty buffer, so either side can only proceed when the other arrives: the actual message exchange is synchronous).
- freedomben 5y agoNice, thanks that makes a lot of sense and definitely an important difference.