|
Boost : |
From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-09-16 11:04:07
At Monday 2002/09/16 05:29, you wrote:
>"Hillel Y. Sims" wrote:
> >
> > "Eric Woodruff" <Eric.Woodruff_at_[hidden]> wrote in message
> > news:014f01c25a8f$605ebd80$1800000a_at_soy...
> > > When return values enter the picture, join needs to become the return
> > value
> > > accessor, allowed to be called more than once
> >
> > If this is the case, how would the thread library know when to finally
> clean
> > up the finished thread's resources?
>
>When the last reference goes away (i.e. managing thread objects via
>smart pointers; I'd even choose *AUTO*_ptr like move semantics by
>default with some "shared ownership" adapter for {current} standard
>containers and algorithms). http://www.terekhov.de/mythread.c
>
>---
>int my_thread_join( my_thread_t mt,void** value_ptr );
>
>int my_thread_tryjoin( my_thread_t mt,void** value_ptr );
>
>int my_thread_timedjoin( my_thread_t mt,
> struct timespec* timeout,
> void** value_ptr );
>---
So, we're going to intentionally put a "timing window" problem into user
code....
multiple join() will work just fine _provided_ that all the relevant join()
requests actually occur _before_ the thread terminates. Otherwise, all
bets are off.
I don't like it.
>regards,
>alexander.
>
>
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
"There oughta be a law"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk