mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-04 20:25:29 +00:00
Add auto-increment option and accompanying test.
This allows for the threadpool to automatically grow if tasks are pushed to it and no idle threads are currently available. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -86,12 +86,23 @@ struct ast_threadpool_options {
|
||||
#define AST_THREADPOOL_OPTIONS_VERSION 1
|
||||
/*! Version of thradpool options in use */
|
||||
int version;
|
||||
/* !
|
||||
/*!
|
||||
* \brief Time limit in seconds for idle threads
|
||||
*
|
||||
* A time of 0 or less will mean an infinite timeout.
|
||||
*/
|
||||
int idle_timeout;
|
||||
/*!
|
||||
* \brief 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.
|
||||
*/
|
||||
int auto_increment;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user