Concurrent Programming



Definitions

back to top


Creating a New Process

Before:

Code in Pid1

Pid2 = spawn(Mod, Func, Args)
After

Pid2 is process identifier of the new process - this is known only to process Pid1.

back to top


Simple Message Passing

self() - returns the Process Identity (Pid) of the process executing this function.

From and Msg become bound when the message is received. Messages can carry data.