Boost logo

Boost Users :

From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2007-03-05 23:15:31


On 3/5/07, Manuel Jung <gzahl_at_[hidden]> 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()?
> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net