Behaviours: gen_server.
ppool module instead.
queued() = {gen_server:from(), list()} | list()
reply() = {ok, pid()} | {error, term()} | noalloc | state()
state() = #state{limit = integer(), sup = pid() | undefined, refs = gb_sets:set(reference()), queue = queue:queue(queued()), name = ppool:name()}
| async_queue/2 | See ppool:async_queue/2. |
| code_change/3 | |
| handle_call/3 | |
| handle_cast/2 | |
| handle_info/2 | |
| init/1 | |
| run/2 | See ppool:run/2. |
| start/4 | Starts an unlinked pool server (not used by the library itself). |
| start_link/4 | Starts a pool server linked to the caller, registered as Name. |
| status/1 | See ppool:status/1. |
| stop/1 | Stops the pool server normally. |
| sync_queue/2 | See ppool:sync_queue/2. |
| terminate/2 |
See ppool:async_queue/2.
A cast to a name nobody has registered is silently dropped, so a
mistyped pool name would look like success. Rather than turn the
cast into a call (which would make the caller wait for the pool),
check that the name resolves first, and fail the way the calls
in this module do when there is no pool: exit with noproc. The
check and the cast are not atomic; a pool that dies in between
still loses the request, as it would anyway.
code_change(OldVsn, State, Extra) -> Result
handle_call(Request, From, State) -> Result
Request = term()From = gen_server:from()State = state()Result = {reply, reply(), state()} | {noreply, state()} | {stop, normal, ok, state()}
init(Args) -> Result
Args = {integer(), ppool:mfa_spec(), pid(), ppool:name()}Result = {ok, state()}
run(Name, Args) -> Result
Name = ppool:name()Args = list()Result = {ok, pid() | undefined} | noalloc | {error, term()}
See ppool:run/2.
start(Name, Limit, Sup, MFA) -> Result
Name = ppool:name()Limit = integer()Sup = pid()MFA = ppool:mfa_spec()Result = {ok, pid()} | ignore | {error, term()}
Starts an unlinked pool server (not used by the library itself).
start_link(Name, Limit, Sup, MFA) -> Result
Name = ppool:name()Limit = integer()Sup = pid()MFA = ppool:mfa_spec()Result = {ok, pid()} | ignore | {error, term()}
Starts a pool server linked to the caller, registered as Name.
Sup is the pool's supervisor, in which the worker supervisor is
started.
See ppool:status/1.
Stops the pool server normally. Its supervisor is
permanent for it, so the pool is restarted empty.
sync_queue(Name, Args) -> Result
Name = ppool:name()Args = list()Result = {ok, pid() | undefined} | {error, term()}
See ppool:sync_queue/2.
Generated by EDoc