From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-09 13:52:39
At Wednesday 2002/08/07 17:30, you wrote:
>I'm a little bemused by the way that some parts of a standard which afaik
>doesn't consider multi-threading at all, seems to be exerting considerable
>influence on what is the "right" way to deal with an uncaught exception in a
>thread. I'm thinking specifically here of the "uncaught exception calls
>terminate()" behaviour. The logic that leads to this decision appears
>obvious in a single threaded environment. The process terminates and if
>anything bothers to check/cares the way the process terminated can be
>determined (to the extent that the process terminated abnormally, and maybe
>more than this if a handler was installed to report something more).
>It seems to me (and maybe this is misguided, but I'd really like to know
>where I've gone wrong with this) that once one introduces threads each
>thread should be considered as though it were an independent process that
>just happens to have inherited an awful lot of its parents resources (ie.
>all of them) and shares its address space. But what is the per-thread
>"terminate()" behaviour? I don't know/it depends/I think it would be
>productive to discuss this. I'm not currently buying the "because the
>standard says" argument as being terribly valid here, but I'm no expert -
>maybe you can explain why this isn't an area where a more "liberal
>interpretation" is appropriate. I don't see a huge amount of difference
>between one thread be able to check what led to the thread terminating (if
>one cares) or ignore it, just as is the case for the process parent when an
>process terminates due to an uncaught exception.
I'm definitely with you on this one.
IF exceptions were to propagate across the "join()" call, then the
exception wouldn't be "uncaught" unless the parent exits withOUT calling
"join()" at which point the standard "kicks in", but I don't think it
considers what it means to have an exception during the terminate process.
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