diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-12-03 16:59:26 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-12-03 16:59:26 +0000 |
commit | e7ce12839daeb903eeaff999171025e6652b7c26 (patch) | |
tree | 141a28aed3b1dd69dccf14558905473bf7a8bf73 /include | |
parent | b44f72f79481f84e7cdc21243ac127e62b9e5ed0 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/threadpool.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/asterisk/threadpool.h b/include/asterisk/threadpool.h index 7a20abdcb..d4c10b8d5 100644 --- a/include/asterisk/threadpool.h +++ b/include/asterisk/threadpool.h @@ -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 */ |