Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-13 02:01:12


At Monday 2002/08/12 14:22, you wrote:
>Dale wrote:
>
> >1) thread<void> threads call terminate(), thread<XXX> threads propogate the
> >exception when join is called.
>
>Propogating an exception in an different thread context than it started
>in (different stack, specifically) is a hard, if not impossible, problem.

it seems trivial to me, providing that you can accurately asses what the
exception is!
the general plan is to 'mark' the thread in some fashion as to capture the
exception and save it's state.
when join() is called, the state of the thread is determined and if an
exception is saved, it is copied, then thrown.
from the point of view of the person calling join() an exception of the
correct type etc. is caught, one hopes, by a matching catch() clause. All
done. I fail to see what a "different" stack has to do with anything.

>Just copying an exception so it will survive, typed correctly, the exit
>of a catch clause seems daunting.
>
>What mechanisms does boost.threads rely on/require such that this works
>portably?
>
>[I have skipped parts of the threads/exceptions discussion, so please
>point me at the relavent postings if I've missed the discussion of this issue]
>
>Mitch
>
>--
>Mitch Adler "Could you please continue the petty
>Apple Computer, Inc. bickering. I find it most intriguing."
>Mitch_at_[hidden] - Data
>MAdler_at_[hidden]
>
>
>_______________________________________________
>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