poolgirl (poolgirl v2.2.1)

Link to this section Summary

Functions

This function exists for compatibility with poolboy only
Fetch a worker from a pool
The same as child_spec/3 with no configuration options
The pool spec to use under your supervision tree
List your pool's workers
Change your pool's size
Fetch the status of a pool
Kill your pool
Execute your function in the context of a pool worker

Link to this section Types

Specs

pool() :: Name :: atom().

Specs

start_ret() :: {ok, pid()} | {error, term()}.

Link to this section Functions

Link to this function

checkin(PoolId, Worker)

Specs

checkin(PoolId :: pool(), Worker :: pid()) -> ok.
This function exists for compatibility with poolboy only
Link to this function

checkout(PoolId)

Specs

checkout(PoolId :: pool()) -> no_process | pid().
Fetch a worker from a pool
Link to this function

child_spec(PoolId, PoolArgs)

Specs

child_spec(PoolId :: term(), PoolArgs :: proplists:proplist()) -> supervisor:child_spec().
The same as child_spec/3 with no configuration options
Link to this function

child_spec(PoolId, PoolArgs, WorkerArgs)

Specs

child_spec(PoolId :: term(), PoolArgs :: proplists:proplist(), WorkerArgs :: proplists:proplist()) ->
              supervisor:child_spec().
The pool spec to use under your supervision tree
Link to this function

get_workers(PoolId)

Specs

get_workers(PoolId :: pool()) -> list().
List your pool's workers
Link to this function

spin(UpOrDown, PoolId, HowMany)

Specs

spin(UpOrDown :: up | down, PoolId :: pool(), HowMany :: pos_integer()) -> ok.
Change your pool's size

Specs

status(PoolId :: pool()) -> {atom(), integer()}.
Fetch the status of a pool

Specs

stop(PoolId :: pool()) -> ok.
Kill your pool
Link to this function

transaction(PoolId, Fun)

Specs

transaction(PoolId :: pool(), Fun :: fun((Worker :: pid()) -> any())) -> any().
Execute your function in the context of a pool worker