From: Robin Boerdijk (robin_boerdijk_at_[hidden])
Date: 2006-01-18 02:49:53
> Robin Boerdijk wrote:
> > "if the sender causes [signals] the event before the receiver waits
> > it, the receiver will remain delayed until the next event is caused
> > [signalled]".
> But I struck this exact problem the other day with boost threads
> condition variables. Both notify_one() & notify_all() have no effect
> there are no threads waiting:
This is getting a bit off-topic, but to get a Windows style auto-reset
events you need a mutex, a condition variable and a boolean flag. It
would look something like this:
set boolean flag
notify condition variable
wait for event:
while not boolean flag set
wait for condition variable
reset boolean flag
This is a Windows style auto-reset event. My original question was (and
still is), what is wrong with this?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk