O'Reilly logo

Functional Web Development with Elixir, OTP, and Phoenix by Lance Halvorsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linking Processes

Supervisors may sound magical, but there are two simple, practical mechanisms behind their magic: linking processes and trapping exits. We’re going to see how they work together to make supervisors work.

The key to process supervision is for one process to be able to link to other processes and know when those other processes crash. Beyond that, the supervising process needs to be able to keep running if it gets crash notifications from processes it’s linked to.

When one process in a group of linked processes crashes, it sends a special kind of message called an exit signal to all the other processes it’s linked to. Any process that receives an exit signal will also exit and send an exit signal to all the other processes that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required