Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-09-23 17:53:57

Jason Hise wrote:

> The problem is that joining x before main exits forces the process to
> wait until x is done sleeping before main can exit. If there is no
> way to wake up a sleeping thread, then it appears my only option is to
> sleep for very short intervals and keep checking two conditions to see if
> sleeping should stop (time elapsed, or early wakeup signaled).

Can't you block on the condition variable as usual and use notify_all in the
main thread to wake everyone up so that they can check the "should_exit"

Boost list run by bdawes at, gregod at, cpdaniel at, john at