Meeting the Supervisor
Just like in the workplace, where supervisors are held responsible for groups of employees, Elixir supervisors are responsible for the processes assigned to them. Subordinate processes are also required to report back to their supervisor, who has to ensure everything is running smoothly. To accomplish this, supervisors come with a set of features that allow them to effectively manage other processes. They can start and stop processes and restart them in case of unforeseen errors in the system. They are configured to trap exits, so when a supervised process exits with an error, that error will be isolated and it won’t propagate further. All this makes supervisors an important building block for fault-tolerant applications. ...
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