From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2001-08-09 14:27:49
> I've not included a return type currently. That's something that's
> open for debate, but I find that most of the time it's not an integer
> return that you need, so the whole C based concept of returning an
> integer is flawed and serves little purpose. But that's *MY* opinion
> and I'm more than willing to listen to arguments on this one.
it would be great to have some template based solution with join
returning a pointer (NULL used as cancel indication). C++ thread
object could be used to store the return value to avoid extra memory
> > thread::join() and thread::wait_blabla()
> > ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
> > *JOIN* wait for begin of
> > multiple calls thread termination,
> > (from multiple does not guarantee
> > threads) is OK. that term. is completed
> > on return.
> I don't totally follow you here. I don't see why there's a need for
> two differing semantics. When would it ever be valid to wait for the
> thread to "begin termination".
when you are interested in return value only and/or just
want to know that thread start routine have returned or
was interrupted by _exit/cancel and do not want to wait
for end of thread termination (eventual cleanup handlers,
tsd destructors,...; allowing it to run "in parallel"
after you have got return value/control flow indication;
you could even detach the thread afterwards...);
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk