From: Matthew Hurd (matt_at_[hidden])
Date: 2004-01-05 15:21:41
> -----Original Message-----
> On Behalf Of Roland
> How do I simultaneously wait for a condition _or_ a pending IO operation
> becoming notified/signalled.
To wait on two or more things _without_ polling, or timed blocking, you are
going to have to encapsulate a wait for multiple objects like thing using a
1 to n thread technique where a thread blocks waiting for one of the other
threads to notify my condition which will then cancel the other threads from
waiting. However, this in turn will require the other threads to be
cancelled, or timed block with their wake up and signalling to check if they
should shut down. It is getting messy as this will require polling, or
timed blocking, in the dependent threads as boost does not support thread
This is a similar question to a simpler question of how do I shut down an
active object that is blocked waiting... Cancel the thread, timed block
with shutdown condition check or wait for one of two signals. I can only
see a solution with the second option within boost which is what I currently
use for my message and priority queues.
Anyone see a better option? Does posix provide a win32 WFMO equivalent
boost can wrap?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk