Boost logo

Boost :

From: David Bergman (davidb_at_[hidden])
Date: 2002-08-13 10:16:37


I agree,

In a language where you would actually have access to (the traces of)
the unwinding stack, it would be a bit different though, such as in
Java. The origin of exception is there important both to properly
identifying the source of problems and for certain debugging
environments, letting you traverse that unwinded stack.

People are afraid of an exception unwinding one stack and then (although
cloned) unwinding part of another stack, in another thread. Scary!

I would like someone to please try to explain that fear in detail, so I
can understand why the thread-crossing exception is inherently evil...

"I see dead exceptions..."

/David

-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Victor A. Wagner,
Jr.
Sent: Tuesday, August 13, 2002 3:01 AM
To: boost_at_[hidden]
Subject: Re: [boost] Attempting resolution of Threads & Exceptions Issue

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"

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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