From: simon meiklejohn (simon_at_[hidden])
Date: 2005-12-05 13:54:43
>it's a nice implementation.
>Maybe you could add a timed enqueue and dequeue and a limitation
>(amount) for the work items in the queue.
> You could use the implementation form thread_queue in the same sandbox
Thanks for the positive feedback. And the offer of source code
Your suggestion about adding timed enqueue/dequeue
and a limitation on the amount of queued work items
raises an interesting point about how this kind of library
could be structured. I'd see those features not as part of
the defer_point, but as classes built on top and
parameterised with an instance of a defer_point.
A thread_queue parameterised with a defer_point
would still keep all the logic about high/low water marks
and simply use the defer_point as a means of getting a
callback in order to service the request (i.e. by calling
into the queue consumer code).
A bit cheeky i know, but would you be willing to write
an implementation of thread_queue along the above lines
as a test of defer_point?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk