mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-06 13:07:21 +00:00
threadpool: Whitespace and comment corrections.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -103,6 +103,9 @@ struct ast_threadpool_options {
|
|||||||
*
|
*
|
||||||
* When the threadpool's size increases, it can never increase
|
* When the threadpool's size increases, it can never increase
|
||||||
* beyond this number of threads.
|
* beyond this number of threads.
|
||||||
|
*
|
||||||
|
* Zero is a valid value if the threadpool does not have a
|
||||||
|
* maximum size.
|
||||||
*/
|
*/
|
||||||
int max_size;
|
int max_size;
|
||||||
};
|
};
|
||||||
@@ -132,7 +135,7 @@ void *ast_threadpool_listener_get_user_data(const struct ast_threadpool_listener
|
|||||||
* \brief Create a new threadpool
|
* \brief Create a new threadpool
|
||||||
*
|
*
|
||||||
* This function creates a threadpool. Tasks may be pushed onto this thread pool
|
* This function creates a threadpool. Tasks may be pushed onto this thread pool
|
||||||
* in and will be automatically acted upon by threads within the pool.
|
* and will be automatically acted upon by threads within the pool.
|
||||||
*
|
*
|
||||||
* Only a single threadpool with a given name may exist. This function will fail
|
* Only a single threadpool with a given name may exist. This function will fail
|
||||||
* if a threadpool with the given name already exists.
|
* if a threadpool with the given name already exists.
|
||||||
|
@@ -1137,13 +1137,15 @@ static int execute_tasks(void *data)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void serializer_task_pushed(struct ast_taskprocessor_listener *listener, int was_empty) {
|
static void serializer_task_pushed(struct ast_taskprocessor_listener *listener, int was_empty)
|
||||||
|
{
|
||||||
if (was_empty) {
|
if (was_empty) {
|
||||||
struct serializer *ser = ast_taskprocessor_listener_get_user_data(listener);
|
struct serializer *ser = ast_taskprocessor_listener_get_user_data(listener);
|
||||||
struct ast_taskprocessor *tps = ast_taskprocessor_listener_get_tps(listener);
|
struct ast_taskprocessor *tps = ast_taskprocessor_listener_get_tps(listener);
|
||||||
|
|
||||||
ast_threadpool_push(ser->pool, execute_tasks, tps);
|
ast_threadpool_push(ser->pool, execute_tasks, tps);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
static int serializer_start(struct ast_taskprocessor_listener *listener)
|
static int serializer_start(struct ast_taskprocessor_listener *listener)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user