Basics of Elixir process
Elixir processes are self-contained abstractions. The context of each process is isolated from the contexts of other processes. Messages are required to share information between the processes. This is considered the actor-model. Each process is an actor, capable of sending and receiving messages from other actors. Based on the contents of a message, an actor may perform certain actions. This is the foundation of Elixir processes: self-contained actors operate on information sent to them, and the result is often sent back to the calling process.
Of course, if that's all there was to it, we would be essentially done. But concurrent programming is never that simple.
There are several functions automatically available to most Elixir modules and inside an iex
session, and these will be the majority of the discussion of this chapter.
Self
We have seen process identifiers before, but now it's time to explain the numbers involved with the numbers shown.
If we start an interactive...