Asterisk - The Open Source Telephony Project  21.4.1
Data Fields
ast_threadpool_options Struct Reference

Data Fields

int auto_increment
 Number of threads to increment pool by. More...
 
int idle_timeout
 Time limit in seconds for idle threads. More...
 
int initial_size
 Number of threads the pool will start with. More...
 
int max_size
 Maximum number of threads a pool may have. More...
 
void(* thread_end )(void)
 Function to call when a thread ends. More...
 
void(* thread_start )(void)
 Function to call when a thread starts. More...
 
int version
 

Detailed Description

Definition at line 70 of file threadpool.h.

Field Documentation

int auto_increment

Number of threads to increment pool by.

If a task is added into a pool and no idle thread is available to activate, then the pool can automatically grow by the given amount.

Zero is a perfectly valid value to give here if you want to control threadpool growth yourself via your listener.

Definition at line 90 of file threadpool.h.

Referenced by stasis_init().

int idle_timeout

Time limit in seconds for idle threads.

A time of 0 or less will mean no timeout.

Definition at line 79 of file threadpool.h.

Referenced by stasis_init().

int initial_size

Number of threads the pool will start with.

When the threadpool is allocated, it will immediately size itself to have this number of threads in it.

Zero is a valid value if the threadpool should start without any threads allocated.

Definition at line 100 of file threadpool.h.

Referenced by stasis_init().

int max_size

Maximum number of threads a pool may have.

When the threadpool's size increases, it can never increase beyond this number of threads.

Zero is a valid value if the threadpool does not have a maximum size.

Definition at line 110 of file threadpool.h.

Referenced by stasis_init().

void(* thread_end) (void)

Function to call when a thread ends.

This is useful if there is common cleanup to execute when a thread completes

Definition at line 124 of file threadpool.h.

void(* thread_start) (void)

Function to call when a thread starts.

This is useful if there is something common that all threads in a threadpool need to do when they start.

Definition at line 117 of file threadpool.h.

int version

Version of threadpool options in use

Definition at line 73 of file threadpool.h.

Referenced by ast_sorcery_init(), AST_TEST_DEFINE(), ParsingContext::next_stack(), and stasis_init().


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