From: Michael Glassford (glassfordm_at_[hidden])
Date: 2004-02-18 19:46:51
How does it know when to release all the threads? Do you mean that you
would "register" ahead of time which threads are supposed to wait, and
it releases them all when they have all waited on the barrier? What
would happen if an "unregistered" thread tried to wait on the barrier?
"Matthew Vogt" <mvogt_at_[hidden]> wrote in message
> Michael Glassford <glassfordm <at> hotmail.com> writes:
> > > Actually, to get enough threads to reenter barrier while some
> > > still inside, you need fresh threads on the next barrier. IOW,
threads A, B
> > > and C wait on barrier. A gets through and spawns B' and C'. Then
A, B' and
> > > C' wait on barrier, get though, and leave B and C stuck on
> > > forever.
> > True, I realize that. Or you could simply create a barrier that
> > until it reaches, say, 5 threads and then send 10 threads through
> > a worst case scenario, 4 of the first 5 threads to wait on the
> > could get stuck there permanently.
> Is it possible to create a barrier that waits for a set of threads
> permitting them to continue, rather than a count of threads?
> thread_group is a safer layer at which to implement a barrier...
> (Adding extra lines at the end to make gmane let this through...)
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk