Processes and concurrency
A process is the unit of concurrency in Elixir: it is cheap, it owns its state, and it talks to the rest of the system by messages. This part starts with spawn and send and ends with the tools that wrap them.
The last lessons show how a link and a monitor report a death, how a loop carries state, and what a process costs when a program starts a hundred thousand of them. That is the knowledge the next part needs: OTP is a set of rules for processes that must not be lost.
9.1
Processes
spawn, send and receive, and the pid that answers
Open
9.2
Messages and the mailbox
selective receive, the timeout, and a mailbox that grows without a reader
Open
9.3
Links and monitors
the link, the monitor, the exit signal, and the flag that traps it
Open
9.4
Tasks and Agents
Task.async and await, the supervisor of tasks, and an Agent as state in a process
Open
9.5
Tasks in parallel
async_stream, the concurrency limit, and the order the results come back in
Open
9.6
State in a process
a loop that carries state, and why a process is the mutable cell of a functional language
Open
9.7
Many processes
a hundred thousand pids, the schedulers, and what one process costs
Open