Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-24 12:52:28


From: "Alexander Terekhov" <terekhov_at_[hidden]>
>
> Peter Dimov wrote:
> [...]
> > > A) R* join()
> > >
> > > thread::canceled( jtp->join() ) would yield TRUE if
> > > thread was canceled, otherwise result pointer can be
> > > safely derefenced ("void R" aside);
> > [...]
> > > What's wrong with it (the need to communicate exception type
> > > lists to the "generic" code, aside please)?
> >
> > Nothing (except that R cannot be a reference type.)
>
> But R CAN be some reference "wrapper" type, I guess.
>
> > Which is better depends on typical use. ....
>
> Well, how would you "communicate" canceled, busy and timedout
> "results" (using join/tryjoin/timedjoin operations), then?

Subject needs further investigation. :-) The alternatives I see are

R * timedjoin(time); // 0 (or nonportable special value) on timeout
R timedjoin(time) throw (timed_out);
bool timedjoin(time); // false on timeout, need join() to extract return
value


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk