summaryrefslogtreecommitdiff
path: root/include/asterisk/threadpool.h
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-12-04 21:11:34 +0000
committerMark Michelson <mmichelson@digium.com>2012-12-04 21:11:34 +0000
commita37fb2e8c89332f4cd9facf1884d982813614f0c (patch)
tree353eb854c8817040314814589a72f8d696ae3cf9 /include/asterisk/threadpool.h
parent47a9abdedaebb7a32a11d256e6a39368f90bd931 (diff)
Add some doxygen and rearrange code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/threadpool.h')
-rw-r--r--include/asterisk/threadpool.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asterisk/threadpool.h b/include/asterisk/threadpool.h
index d4c10b8d5..8ff218492 100644
--- a/include/asterisk/threadpool.h
+++ b/include/asterisk/threadpool.h
@@ -94,6 +94,19 @@ struct ast_threadpool *ast_threadpool_create(struct ast_threadpool_listener *lis
void ast_threadpool_set_size(struct ast_threadpool *threadpool, unsigned int size);
/*!
+ * \brief Push a task to the threadpool
+ *
+ * Tasks pushed into the threadpool will be automatically taken by
+ * one of the threads within
+ * \param pool The threadpool to add the task to
+ * \param task The task to add
+ * \param data The parameter for the task
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int ast_threadpool_push(struct ast_threadpool *pool, int (*task)(void *data), void *data);
+
+/*!
* \brief Shut down a threadpool and destroy it
*
* \param pool The pool to shut down