Module poolgirl

Behaviours: gen_server.

Data Types

pool()

pool() = atom()

Function Index

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

Function Details

checkin/2

checkin(PoolId::pool(), Worker::pid()) -> ok

This function exists for compatibility with poolboy only

checkout/1

checkout(PoolId::pool()) -> no_process | pid()

PoolId: The unique pool id

Fetch a worker from a pool

child_spec/2

child_spec(PoolId::term(), PoolArgs::proplists:proplist()) -> supervisor:child_spec()

The same as child_spec/3 with no configuration options

child_spec/3

child_spec(PoolId::term(), PoolArgs::proplists:proplist(), WorkerArgs::proplists:proplist()) -> supervisor:child_spec()

PoolId: The unique pool id
PoolArgs: The pool's configuration options
WorkerArgs: The pool's worker's configuration options

The pool spec to use under your supervision tree

get_workers/1

get_workers(PoolId::pool()) -> list()

PoolId: The unique pool id

List your pool's workers

spin/3

spin(UpOrDown::up | down, PoolId::pool(), HowMany::pos_integer()) -> ok

UpOrDown: The size direction (up or down)
PoolId: The unique pool id

Change your pool's size

status/1

status(PoolId::pool()) -> {atom(), integer()}

PoolId: The unique pool id

Fetch the status of a pool

stop/1

stop(PoolId::pool()) -> ok

PoolId: The unique pool id

Kill your pool

transaction/2

transaction(PoolId::pool(), Fun::fun((Worker::pid()) -> any())) -> any()

PoolId: The unique pool id
Fun: A (catch-protected) function (taking a worker as input) to execute

Execute your function in the context of a pool worker


Generated by EDoc