ast_threadpool_listener_callbacks Struct Reference

#include <threadpool.h>


Data Fields

void(* emptied )(struct ast_threadpool *pool, struct ast_threadpool_listener *listener)
 Indicates the threadpool's taskprocessor has become empty.
void(* shutdown )(struct ast_threadpool_listener *listener)
 The threadpool is shutting down.
void(* state_changed )(struct ast_threadpool *pool, struct ast_threadpool_listener *listener, int active_threads, int idle_threads)
 Indicates that the state of threads in the pool has changed.
void(* task_pushed )(struct ast_threadpool *pool, struct ast_threadpool_listener *listener, int was_empty)
 Indicates that a task was pushed to the threadpool.


Detailed Description

Definition at line 27 of file threadpool.h.


Field Documentation

void(* emptied)(struct ast_threadpool *pool, struct ast_threadpool_listener *listener)

Indicates the threadpool's taskprocessor has become empty.

Parameters:
pool The pool that has become empty
listener The threadpool's listener

Referenced by queued_emptied(), and threadpool_tps_emptied().

void(* shutdown)(struct ast_threadpool_listener *listener)

The threadpool is shutting down.

This would be an opportune time to free the listener's user data if one wishes. However, it is acceptable to not do so if the user data should persist beyond the lifetime of the pool.

Parameters:
listener The threadpool's listener

Referenced by threadpool_tps_shutdown().

void(* state_changed)(struct ast_threadpool *pool, struct ast_threadpool_listener *listener, int active_threads, int idle_threads)

Indicates that the state of threads in the pool has changed.

Parameters:
pool The pool whose state has changed
listener The threadpool listener
active_threads The number of active threads in the pool
idle_threads The number of idle threads in the pool

Referenced by threadpool_send_state_changed().

void(* task_pushed)(struct ast_threadpool *pool, struct ast_threadpool_listener *listener, int was_empty)

Indicates that a task was pushed to the threadpool.

Parameters:
pool The pool that had a task pushed
listener The threadpool listener
was_empty Indicates whether there were any tasks prior to adding the new one.

Referenced by queued_task_pushed().


The documentation for this struct was generated from the following file:

Generated on Thu Apr 16 06:35:43 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6