Typedefs | |
typedef smd_threadpool_t | smd_threadpool_t |
typedef sul_error_t *(* | smd_threadpool_fn_t )(void *baton, apr_pool_t *pool) |
Functions | |
sul_error_t * | smd_threadpool_create (smd_threadpool_t **threadp, apr_size_t quesz, apr_size_t numthrds, smd_threadpool_fn_t fn, apr_pool_t *pool) |
sul_error_t * | smd_threadpool_spawn (smd_threadpool_t *threadp, apr_pool_t *pool) |
sul_error_t * | smd_threadpool_push (smd_threadpool_t *threadp, void *arg) |
sul_boolean_t | smd_threadpool_running (smd_threadpool_t *threadp) |
sul_error_t * | smd_threadpool_destroy (smd_threadpool_t *threadp) |
|
Each therad pool as a work function that is invoked by child threads to handle incoming packages of data. This package of data can determine the type of work to do, for example. A work function will only be invoked once per package of data. |
|
Thread pool structure that stores information on a group of Threads that are cooporating to process incoming packages of data. |
|
Create a new Thread Pool in THREADP, creating NUMTHRDS threads that are ready and willing to retrieve and server packages given to this thread pool.
|
|
Destroys a thread pool, cleaning up all of the active Threads.
|
|
Pushes a new package of data into the thread pool's queue. Immediately after this if a thread is waiting then the package will be poped off and handled in the worker function. This function returns immediately.
|
|
Checks to see if the given thread pool is still running or if its been terminated and dead.
|
|
Spawns a new worker thread in this Thread Pool.
|