summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-12-11 16:34:00 +0000
committerMark Michelson <mmichelson@digium.com>2012-12-11 16:34:00 +0000
commit8760e32ae380f65420799c290f7b92d40cd7926c (patch)
tree21f110cf8fd84476baee7e0fea62f4776db12055 /include
parent29fc1227839155658ca899cdfa179673c88e1ee2 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/threadpool.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/asterisk/threadpool.h b/include/asterisk/threadpool.h
index 9834d9180..39792b1bb 100644
--- a/include/asterisk/threadpool.h
+++ b/include/asterisk/threadpool.h
@@ -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;
};
/*!