View Source wpool_process (worker_pool v6.1.0)

Decorator over gen_server that lets wpool_pool control certain aspects of the execution

Link to this section Summary

Link to this section Types

-type from() :: {pid(), reference()}.
-type next_step() :: timeout() | hibernate | {continue, term()}.
-type options() :: [{time_checker | queue_manager, atom()} | wpool:option()].
-opaque state()

Link to this section Functions

Link to this function

call(Process, Call, Timeout)

View Source
-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}).

Link to this function

send_request(Name, Request)

View Source
-spec send_request(wpool:name() | pid(), term()) -> term().

Equivalent to gen_server:send_request(Process, Request).

Link to this function

start_link(Name, Module, InitArgs, Options)

View Source
-spec start_link(wpool:name(), module(), term(), options()) ->
              {ok, pid()} | ignore | {error, {already_started, pid()} | term()}.
Starts a named process