View Source wpool_process_callbacks behaviour (worker_pool v6.4.0)
Summary
Functions
Adds a callback module.
Sends a notification to all registered callback modules.
Removes a callback module.
Types
-type event() :: handle_init_start | handle_worker_creation | handle_worker_death.
-type state() :: module().
Callbacks
-callback handle_init_start(wpool:name()) -> any().
-callback handle_worker_creation(wpool:name()) -> any().
-callback handle_worker_death(wpool:name(), term()) -> any().
Functions
-spec add_callback_module(wpool:name(), module()) -> ok | {error, any()}.
Adds a callback module.
Sends a notification to all registered callback modules.
-spec remove_callback_module(wpool:name(), module()) -> ok | {error, any()}.
Removes a callback module.