wpool_queue_manager

Types


    

pool_prop() = {pool, wpool:name()}

    

pool_props() = [pool_prop() | qm_prop()]

    

qm_prop() = {queue_manager, queue_mgr()}

    

queue_mgr() = atom()

Functions


available_worker(QueueManager::queue_mgr(), Timeout::timeout()) -> noproc | timeout | atom()

returns the first available worker in the pool

cast_to_available_worker(QueueManager::queue_mgr(), Cast::term()) -> ok

Casts a message to the first available worker.        Since we can wait forever for a wpool:cast to be delivered        but we don't want the caller to be blocked, this function        just forwards the cast when it gets the worker

new_worker(QueueManager::queue_mgr(), Worker::atom()) -> ok

Mark a brand new worker as available

worker_ready(QueueManager::queue_mgr(), Worker::atom()) -> ok

Mark a worker as available

worker_busy(QueueManager::queue_mgr(), Worker::atom()) -> ok

Mark a worker as no longer available

worker_dead(QueueManager::queue_mgr(), Worker::atom()) -> ok

Decrement the total number of workers

pools() -> [pool_props()]

Return the list of currently existing worker pools.

stats(Pool_Name::name() (see module wpool)) -> proplist() (see module proplists) | {error, {invalid_pool, name() (see module wpool)}}

Returns statistics for this queue.

proc_info(Pool_Name::name() (see module wpool)) -> proplist() (see module proplists)

Return a default set of process_info about workers.

proc_info(Pool_Name::name() (see module wpool), Info_Type::atom() | [atom()]) -> proplist() (see module proplists)

Return the currently executing function in the queue manager.

trace(Pool_Name::name() (see module wpool)) -> ok

Default tracing for 5 seconds to track worker pool execution times        to error.log.

trace(Pool_Name::name() (see module wpool), X2::boolean(), Timeout::pos_integer()) -> ok | {error, {invalid_pool, name() (see module wpool)}}

Turn pool tracing on and off.