Asterisk - The Open Source Telephony Project GIT-master-7921072
Data Fields
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. More...
 
void(* shutdown )(struct ast_threadpool_listener *listener)
 The threadpool is shutting down. More...
 
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. More...
 
void(* task_pushed )(struct ast_threadpool *pool, struct ast_threadpool_listener *listener, int was_empty)
 Indicates that a task was pushed to the threadpool. More...
 

Detailed Description

Definition at line 27 of file threadpool.h.

Field Documentation

◆ emptied

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

Indicates the threadpool's taskprocessor has become empty.

Parameters
poolThe pool that has become empty
listenerThe threadpool's listener

Definition at line 56 of file threadpool.h.

Referenced by queued_emptied(), and threadpool_tps_emptied().

◆ shutdown

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
listenerThe threadpool's listener

Definition at line 67 of file threadpool.h.

Referenced by threadpool_tps_shutdown().

◆ state_changed

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
poolThe pool whose state has changed
listenerThe threadpool listener
active_threadsThe number of active threads in the pool
idle_threadsThe number of idle threads in the pool

Definition at line 36 of file threadpool.h.

Referenced by threadpool_send_state_changed().

◆ task_pushed

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
poolThe pool that had a task pushed
listenerThe threadpool listener
was_emptyIndicates whether there were any tasks prior to adding the new one.

Definition at line 47 of file threadpool.h.

Referenced by queued_task_pushed().


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