Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-08-11 05:27:40

>> > any call made after the first simply exits immediately since all
> > the cleanup has already been handled during the first call.

>NOT OK! (unless you have made it atomic, which i doubt) here you
>introduce different semantics for subsequent calls (could be done
>from different thread(s)). it should provide the same behavior
>(wait until term. is completed) in all cases (for all joining
>threads), IMHO.

I've stayed out of this so far, but... Bill is ABSOLUTELY right here, and
the semantics don't change - in all cases the call will wait until the
thread has finished and then clean up resources - if that has happened
already then there is nothing to do - there's no problem with that even if
it is different from the way POSIX does things, and it's infinitely more
useful IMO.

>thread::wait_for_term( bool term_completed=true ) or
>thread::wait_for_term( bool join=true ) or
>thread::wait_for_term( bool blablabla=true )

That would be appalling, sorry. How do you know if a thread has been
joined already (by some other thread)? Bills design eliminates this
problem and that makes the library much safer to use in practice.

- John Maddock

Boost list run by bdawes at, gregod at, cpdaniel at, john at