GenServer
| Init and start | |
| Callbacks | |
| Info messages | |
| Terminate |
Init and start
The GenServer behavior starts with init/1, which returns the initial state. The supervisor or a client then calls start_link/2 to begin the process.
-behaviour(gen_server).
-init([]).
-start_link({local, ?MODULE}, gen_server, [initial_state]).
Next: Supervisors
Article author: Arthur Isaev