I would like the have the following Blocking Condition Variable
- Once the blocking condition variable had been signaled, all threads will not wait on the particular condition variable
- The condition variable can be unsignaled anytime.
- Once condition variable had been unsignaled, all threads will be waiting on the variable
I look at http://www.boost.org/doc/libs/1_34_0/doc/html/boost/condition.html
However, it doesn't work in (1)
As if there are no thread waiting on the condition variable, the notify_one
/notify_all
called, will make the signal lost
1) thread TA try wait on condition variable C
2) thread TB call `notify_all`
3) thread TA will continue execution
1) thread TB call `notify_all`
2) thread TA wait on condition variable C
3) thread TA will still continue waiting <-- How can I have condition variable C remains in
signaled state, and make no wait for thread TA