Elixir Functions to Manage Processes
Explore Elixir functions used to manage processes, including spawn_link and Process.monitor, to understand how OTP supervisors operate and how application lifecycles are controlled.
We'll cover the following...
We'll cover the following...
Let’s peek under the hood at a few of the basic functions Elixir uses to manage processes. We will look at two of the building blocks that go into OTP:
-
Process creation through
spawn_link/1. -
Notification through
Process.monitor/1.
We won’t use those functions directly as we build out Mastery, but knowing how they work will help you understand how OTP supervisors work. First, let’s start at the beginning, with mix new.
Mix projects define applications
When we type mix new, we’re defining a project. At this point, we need ...