Typedefs | |
typedef smd_worker_group_t | smd_worker_group_t |
typedef smd_worker_t | smd_worker_t |
typedef sul_error_t *(* | smd_worker_fn_t )(smd_worker_t *worker, void *baton, apr_pool_t *pool) |
Functions | |
sul_error_t * | smd_worker_group_create (smd_worker_group_t **self, apr_pool_t *pool) |
sul_error_t * | smd_worker_group_destroy (smd_worker_group_t *group) |
sul_error_t * | smd_worker_group_launch (smd_worker_group_t *group, smd_worker_t **ptr, smd_worker_fn_t fn, void *baton, apr_size_t queue_sz, apr_pool_t *pool) |
sul_error_t * | smd_worker_group_stop (smd_worker_group_t *group, smd_worker_t *worker) |
sul_boolean_t | smd_worker_is_alive (smd_worker_t *worker) |
apr_queue_t * | smd_worker_queue (smd_worker_t *worker) |
sul_error_t * | smd_worker_hybernate (smd_worker_t *worker, apr_interval_time_t interval) |
smd_worker_group_t * | smd_worker_get_group (smd_worker_t *worker) |
apr_thread_mutex_t * | smd_worker_mutex_get (smd_worker_t *worker) |
|
Worker function prototype that is invoked for worker functions. |
|
Worker group instance for spawning multithreaded worker functions for doing cool things. Workers can run for as long as necessary. |
|
Workers do work. Each of them has an associated working function. |
|
Gets the Worker Group for a specific Worker. Usefull for when you'd like to spawn more workers under the group.
|
|
Creates a new Worker Group.
|
|
Kills all Workers in a Worker Group and returns once all of their threads have ceased execution.
|
|
Launches a new Worker.
|
|
Stops a running Worker instance.
|
|
Puts the current thread to sleep for interval microseconds, at the very minimum and wakes up with the thread is interrupted or awakened. Awakenings usually indicate that the thread should die. Note that this is one of two methods that a worker may block for activity.
|
|
Checks to see if the given Worker is still alive or if it's been killed.
|
|
Gets the mutex that is locked and held when we come OUT of hybernation and are running normally.
|
|
Returns the APR queue associated with a worker. Worker's can use these to get jobs and items in a thread safe manner from other threads. When a worker is to die, this queue will also be terminated. This and the hybernate facility are the two methods that worker threads may block for activity.
|