Your Turn
Elixir exists partially because its creator José Valim wanted abstractions for dealing with concurrency at scale. The processes you see in this chapter begin to tell that story.
Processes
Elixir’s lightweight processes are ideally suited for building multiprocess frameworks for dealing with concurrency at scale. Using processes in Elixir feels natural. The processes are even more lightweight than operating system threads. Elixir processes can send messages to one another. Each process has its own message queue, and processes can receive messages that match individual patterns.
Programs use these primitives within message loops. Programs use receive to match messages of a particular type to do a job. Our program matched messages to
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access