mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 16:20:37 +00:00
Address review board feedback from Matt and Richard
* Remove extraneous whitespace * Bump up debug levels of messages and add identifying info to messages. * Account for potential failures of ao2_link() * Add additional test and some more test data * Add some comments in places where they could be useful * Make threadpool listeners and their callbacks optional git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -133,6 +133,8 @@ struct ast_taskprocessor_listener_callbacks {
|
||||
/*!
|
||||
* \brief A listener for taskprocessors
|
||||
*
|
||||
* \since 12.0.0
|
||||
*
|
||||
* When a taskprocessor's state changes, the listener
|
||||
* is notified of the change. This allows for tasks
|
||||
* to be addressed in whatever way is appropriate for
|
||||
@@ -148,7 +150,9 @@ struct ast_taskprocessor_listener {
|
||||
};
|
||||
|
||||
/*!
|
||||
* Allocate a taskprocessor listener
|
||||
* \brief Allocate a taskprocessor listener
|
||||
*
|
||||
* \since 12.0.0
|
||||
*
|
||||
* This will result in the listener being allocated with the specified
|
||||
* callbacks.
|
||||
@@ -176,6 +180,8 @@ struct ast_taskprocessor *ast_taskprocessor_get(const char *name, enum ast_tps_o
|
||||
/*!
|
||||
* \brief Create a taskprocessor with a custom listener
|
||||
*
|
||||
* \since 12.0.0
|
||||
*
|
||||
* The listener's alloc() and start() callbacks will be called during this function.
|
||||
*
|
||||
* \param name The name of the taskprocessor to create
|
||||
@@ -209,6 +215,9 @@ int ast_taskprocessor_push(struct ast_taskprocessor *tps, int (*task_exe)(void *
|
||||
|
||||
/*!
|
||||
* \brief Pop a task off the taskprocessor and execute it.
|
||||
*
|
||||
* \since 12.0.0
|
||||
*
|
||||
* \param tps The taskprocessor from which to execute.
|
||||
* \retval 0 There is no further work to be done.
|
||||
* \retval 1 Tasks still remain in the taskprocessor queue.
|
||||
|
||||
@@ -55,8 +55,8 @@ struct ast_threadpool_listener_callbacks {
|
||||
struct ast_threadpool_listener *listener,
|
||||
int was_empty);
|
||||
/*!
|
||||
* \brief Indicates the threadpoo's taskprocessor has become empty
|
||||
*
|
||||
* \brief Indicates the threadpool's taskprocessor has become empty
|
||||
*
|
||||
* \param listener The threadpool's listener
|
||||
*/
|
||||
void (*emptied)(struct ast_threadpool *pool, struct ast_threadpool_listener *listener);
|
||||
@@ -139,7 +139,7 @@ struct ast_threadpool *ast_threadpool_create(const char *name,
|
||||
*
|
||||
* This number may be more or less than the current number of
|
||||
* threads in the threadpool.
|
||||
*
|
||||
*
|
||||
* \param threadpool The threadpool to adjust
|
||||
* \param size The new desired size of the threadpool
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user