Naming a Process
Learn about naming a process instead of using PIDs in Elixir.
We'll cover the following
The idea of referencing processes by their PIDs gets tedious quickly. Fortunately, there are a number of alternatives. Here, we’ll discuss the option of naming a process.
Assign a name
We can assign a name that’s unique for all OTP processes on our node, and then we use that name instead of the PID whenever we reference it. To create a locally named process, we use the name:
option when we start the server:
Get hands-on with 1400+ tech skills courses.