| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
#include <threadpool.h>
| Data Fields | |
| int | auto_increment | 
| Number of threads to increment pool by. | |
| int | idle_timeout | 
| Time limit in seconds for idle threads. | |
| int | initial_size | 
| Number of threads the pool will start with. | |
| int | max_size | 
| Maximum number of threads a pool may have. | |
| void(* | thread_end )(void) | 
| Function to call when a thread ends. | |
| void(* | thread_start )(void) | 
| Function to call when a thread starts. | |
| int | version | 
Definition at line 72 of file threadpool.h.
| 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 92 of file threadpool.h.
Referenced by queued_task_pushed(), and system_apply().
| int idle_timeout | 
Time limit in seconds for idle threads.
A time of 0 or less will mean no timeout.
Definition at line 81 of file threadpool.h.
Referenced by system_apply(), and worker_idle().
| 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 102 of file threadpool.h.
Referenced by system_apply().
| 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 112 of file threadpool.h.
Referenced by grow(), and system_apply().
| 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 126 of file threadpool.h.
Referenced by worker_start().
| 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 119 of file threadpool.h.
Referenced by worker_start().
| int version | 
Version of threadpool options in use
Definition at line 75 of file threadpool.h.
Referenced by ParsingContext::next().