spawn
creates a new Erlang VM process to run a given module, function, and arguments and returns its process id pid
.
self
returns the current process’pid
Check the PID
s that are printed. We’ve just run the Bob.say
function as a separate process.
Additional reading:
- Processes
iex> h Process