
5 Mar
2007
5 Mar
'07
7:32 p.m.
Manuel Jung wrote:
Hi,
I would like to know the waiting threads for a condition. Is there a way to calculate the number of "wait()"s which would be affected by a notifiy_all()?
No. Another thread can issue a notify_one concurrently with your request. You need to encapsulate the condition variable and keep track of the count yourself.