apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@apache.org>
Subject a generalized version of worker's fdqueue
Date Tue, 13 Aug 2002 20:29:55 GMT
Is there any interest in adding a generalized version of worker's 
fdqueue to apr-util (this is a FIFO not a stack btw) ???

this is different to the resource list posted by aaron, as it just
manages a work queue.


the api:

apr_status_t apr_queue_init(apr_queue_t **queue,
                             int queue_capacity,
                             apr_pool_t *a);

apr_status_t apr_queue_push(apr_queue_t *queue, void *data);
apr_status_t apr_queue_pop(apr_queue_t *queue, void **data);

/* non-blocking versions of above */
apr_status_t apr_queue_trypush(apr_queue_t *queue, void *data);
apr_status_t apr_queue_trypop(apr_queue_t *queue, void **data);

int apr_queue_size(apr_queue_t *queue);

apr_status_t apr_queue_interrupt_all(apr_queue_t *queue);
apr_status_t apr_queue_term(apr_queue_t *queue);

possible improvements will be the ability to push/pop multiple items
off the queue at the same time.



Mime
View raw message