* \param listener The threadpool listener
* \param active_threads The number of active threads in the pool
* \param idle_threads The number of idle threads in the pool
- * \param zombie_threads The number of zombie threads in the pool
*/
void (*state_changed)(struct ast_threadpool_listener *listener,
int active_threads,
- int idle_threads,
- int zombie_threads);
+ int idle_threads);
/*!
* \brief Indicates that a task was pushed to the threadpool's taskprocessor
*
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