wpool_process_callbacks behaviour (worker_pool v7.0.0)
View SourceSummary
Callbacks
Callback handler initialization.
Callback for new worker creation.
Callback for worker termination.
Functions
Adds a callback module.
Sends a notification to all registered callback modules.
Removes a callback module.
Types
-nominal event() :: handle_init_start | handle_worker_creation | handle_worker_death.
Event being reported.
-nominal state() :: module().
Callback state. Basically, the module that handles the callbacks.
Callbacks
-callback handle_init_start(wpool:name()) -> term().
Callback handler initialization.
-callback handle_worker_creation(wpool:name()) -> term().
Callback for new worker creation.
-callback handle_worker_death(wpool:name(), term()) -> term().
Callback for worker termination.
Functions
-spec add_callback_module(wpool:name(), module()) -> ok | {error, term()}.
Adds a callback module.
Sends a notification to all registered callback modules.
-spec remove_callback_module(wpool:name(), module()) -> ok | {error, term()}.
Removes a callback module.