
6 Mar
2007
6 Mar
'07
4:15 a.m.
On 3/5/07, Manuel Jung
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()? Maybe nobody needed this before? Or isn't this possible to implement such a thing with boost::condition and i have to count the waiting threads on the application level?
When would this be useful? Note that as soon as you had that info, it would be out of date: int count = condition.number_of_waiters(); // eg: returns 5 // ...another thread starts waiting here condition.notify_all(); // and 6 threads 'notified'
Greetings Manuel Jung
Tony