GenServer Callbacks: handle_continue and handle_call
Explore how to implement GenServer callbacks handle_continue and handle_call to manage long-running and interactive processes. Understand message handling, state updates, and how to optimize concurrency within Elixir applications.
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 ...