GenServer Callbacks: handle_continue and handle_call
Learn how the GenServer uses handle_continue and handle_call to divide work and interact with processes.
The handle_continue
callback function
The handle_continue/2
callback is a recent addition to GenServer
. Often GenServer
processes do complex work as soon as they start. Rather than blocking the whole application from starting, we return {:ok, state, {:continue, term}}
from the init/1
callback and use handle_continue/2
.
Return values
Accepted ...