3 ms·
A process is simply a function that runs independent of other functions in the system + a mailbox + a handle + own memory. So the convenient Syntax to define a
by cuddlecake 7y ago
A process is simply a function that runs independent of other functions in the system + a mailbox + a handle + own memory.
So the convenient Syntax to define a process is a function declaration. Plus, calling "spawn" to start the process.
Of course, as other responders pointed out, there is also OTP, an established framework (not syntax) to define processes with predefined, battle-tested behaviours.
- ProfHewitt 7y agoThe Actor Model attempts to be as general as possible to support direct modeling and efficient implementation of all digital computation. For example, an Actor is not required to have an external mailbox, which is required for communication in Erlang [Armstrong, et. al. 1992]. Requiring an external mailbox is problematical for Actors because the mailbox would itself necessarily be another Actor thereby immediately leading to an infinite regress. Also, requiring the use of external mailboxes can slow requests between Actors because it would always be necessary to first deposit a request in an Actor’s external mailbox so that the request could later be retrieved. That a request is almost always sent and received without ever residing in persistent storage, where it can be left and later retrieved, is an important engineering goal for Actors.