Asterisk - The Open Source Telephony Project GIT-master-f36a736
Data Fields
worker_thread Struct Reference
Collaboration diagram for worker_thread:
Collaboration graph
[legend]

Data Fields

ast_cond_t cond
 
int id
 
ast_mutex_t lock
 
struct ast_threadpool_options options
 
struct ast_threadpoolpool
 
enum worker_state state
 
pthread_t thread
 
int wake_up
 

Detailed Description

A thread that executes threadpool tasks

Definition at line 143 of file threadpool.c.

Field Documentation

◆ cond

ast_cond_t cond

Condition used in conjunction with state changes

Definition at line 147 of file threadpool.c.

Referenced by worker_idle(), worker_set_state(), worker_thread_alloc(), and worker_thread_destroy().

◆ id

int id

◆ lock

Lock used alongside the condition for state changes

Definition at line 149 of file threadpool.c.

Referenced by worker_idle(), worker_set_state(), worker_start(), worker_thread_alloc(), and worker_thread_destroy().

◆ options

struct ast_threadpool_options options

Options for this threadpool

Definition at line 159 of file threadpool.c.

Referenced by worker_idle(), worker_start(), and worker_thread_alloc().

◆ pool

struct ast_threadpool* pool

A pointer to the threadpool. Needed to be able to execute tasks

Definition at line 153 of file threadpool.c.

Referenced by grow(), threadpool_send_state_changed(), worker_active(), worker_idle(), worker_start(), and worker_thread_alloc().

◆ state

The current state of the worker thread

Definition at line 155 of file threadpool.c.

Referenced by worker_idle(), worker_set_state(), worker_start(), and worker_thread_alloc().

◆ thread

pthread_t thread

The actual thread that is executing tasks

Definition at line 151 of file threadpool.c.

Referenced by worker_shutdown(), worker_thread_alloc(), and worker_thread_start().

◆ wake_up

int wake_up

A boolean used to determine if an idle thread should become active

Definition at line 157 of file threadpool.c.

Referenced by worker_idle(), and worker_set_state().


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