--- /usr/local/src/apr-util-1.2.7/include/apr_queue.h 2005-02-04 14:45:35.000000000 -0600 +++ ./apr_queue-new.h 2006-11-26 15:29:49.000000000 -0600 @@ -102,6 +102,54 @@ APU_DECLARE(apr_status_t) apr_queue_trypop(apr_queue_t *queue, void **data); /** + * Manually blocks pushing/adding onto the queue. + * + * @param queue the queue + * @returns APR_SUCCESS if blocking was successful + * @returns APR_EINTR the blocking was interrupted (try again) + * @returns APR_EOF if the queue has been terminated + */ +APU_DECLARE(apr_status_t) apr_queue_blockpush(apr_queue_t *queue); + +/** + * Manually unblocks pushing/adding onto the queue. + * + * @param queue the queue + * @returns APR_EOF if the queue has been terminated + * @returns APR_SUCCESS if unblocking was successful + */ +APU_DECLARE(apr_status_t) apr_queue_unblockpush(apr_queue_t *queue); + +/** + * Manually blocks popping/getting from the queue. + * + * @param queue the queue + * @returns APR_EINTR the blocking was interrupted (try again) + * @returns APR_EOF if the queue has been terminated + * @returns APR_SUCCESS if blocking was successful + */ +APU_DECLARE(apr_status_t) apr_queue_blockpop(apr_queue_t *queue); + +/** + * Manually unblocks popping/getting from the queue. + * + * @param queue the queue + * @returns APR_EOF if the queue has been terminated + * @returns APR_SUCCESS if unblocking was successful + */ +APU_DECLARE(apr_status_t) apr_queue_unblockpop(apr_queue_t *queue); + +/** + * Blocks until the queue is empty. + * + * @param queue the queue + * @returns APR_EINTR the blocking was interrupted (try again) + * @returns APR_EOF if the queue has been terminated + * @returns APR_SUCCESS if the queue is empty + */ +APU_DECLARE(apr_status_t) apr_queue_isempty(apr_queue_t *queue); + +/** * returns the size of the queue. * * @warning this is not threadsafe, and is intended for reporting/monitoring