mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-06 13:07:21 +00:00
This now compiles.
That's a milestone, of sorts. Things really need arranging/documenting, and there's no function to be able to push tasks to a threadpool. git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -72,15 +72,15 @@ struct ast_threadpool_listener {
|
||||
/*!
|
||||
* \brief Create a new threadpool
|
||||
*
|
||||
* This function creates a threadpool and returns a taskprocessor. Tasks pushed
|
||||
* to this taskprocessor will be handled by the threadpool and will be reported
|
||||
* on the threadpool's listener.
|
||||
* 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.
|
||||
*
|
||||
* \param listener The listener the threadpool will notify of changes
|
||||
* \param initial_size The number of threads for the pool to start with
|
||||
* \retval NULL Failed to create the threadpool
|
||||
* \retval non-NULL The associated taskprocessor
|
||||
* \retval non-NULL The newly-created threadpool
|
||||
*/
|
||||
struct ast_threadpool *ast_threadpool_create(struct ast_threadpool_listener *listener);
|
||||
struct ast_threadpool *ast_threadpool_create(struct ast_threadpool_listener *listener, int initial_size);
|
||||
|
||||
/*!
|
||||
* \brief Set the number of threads for the thread pool
|
||||
@@ -93,4 +93,10 @@ struct ast_threadpool *ast_threadpool_create(struct ast_threadpool_listener *lis
|
||||
*/
|
||||
void ast_threadpool_set_size(struct ast_threadpool *threadpool, unsigned int size);
|
||||
|
||||
/*!
|
||||
* \brief Shut down a threadpool and destroy it
|
||||
*
|
||||
* \param pool The pool to shut down
|
||||
*/
|
||||
void ast_threadpool_shutdown(struct ast_threadpool *pool);
|
||||
#endif /* ASTERISK_THREADPOOL_H */
|
||||
|
Reference in New Issue
Block a user