|
Boost : |
From: mf_dylan_at_[hidden]
Date: 2001-10-11 20:36:49
I sent this as a mail to Bill Kempf first, he suggested I repost it
here:
One thing though, how would I go about waiting on multiple
conditions? This is actually the norm in much of my multi-thread
work...most of the time is spending waiting on various threads and
conditions, usually one of them is a "shutdown" event, another is a
checking for work to do etc. etc. Doesn't seem to be any easy way of
achieving this unless I'm missing something.
If some method for doing this was provided it would be arguably
essential to be able to also wait on other threads terminating (and
ideally other processes, but this is probably out of the scope of
boost threads). I had thought some time back about how something
like this could be possible using an extendable scheme where objects
provide "waitable" handles that can be, well, waited on! I'm not
exactly sure how you could go about doing this with pthreads to be
honest, it doesn't seem to have anything close
to "WaitForMultipleObjects". I thought about doing it with select,
but never got around to experimenting enough to be able to determine
if that was viable.
Dylan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk