wpool_process (worker_pool v7.0.0)
View SourceDecorator over gen_server that lets wpool_pool
control certain aspects of the execution.
Summary
Types
Options for process control.
The atoms, like time_checker and event_manager, correspond to registered process names.
Internal state.
API Functions
Equivalent to gen_server:call(Process, Call, Timeout).
Equivalent to gen_server:cast(Process, {cast, Cast}).
Runs a function that takes as a parameter the given process.
Equivalent to gen_server:send_request(Process, Request).
Starts a named process.
Types
API Functions
-spec call(wpool:name() | pid(), term(), timeout()) -> term().
Equivalent to gen_server:call(Process, Call, Timeout).
-spec cast(wpool:name() | pid(), term()) -> ok.
Equivalent to gen_server:cast(Process, {cast, Cast}).
-spec run(wpool:name() | pid(), wpool:run(Result), timeout()) -> Result.
Runs a function that takes as a parameter the given process.
-spec send_request(wpool:name() | pid(), term()) -> gen_server:request_id().
Equivalent to gen_server:send_request(Process, Request).
-spec start_link(wpool:name(), module(), term(), wpool:options()) -> {ok, pid()} | ignore | {error, {already_started, pid()} | term()}.
Starts a named process.