[c++-pthreads] Re: thread-safety definition
Dave Butenhof
David.Butenhof at hp.com
Tue Jan 13 11:43:24 UTC 2004
David Abrahams wrote:
>Dave Butenhof <David.Butenhof at hp.com> writes:
>
>>I think I disagree, at least philsophically, with the characterization
>>of the model as "fragile". But I think I also understand what you
>>mean; and the problem isn't with the model, but rather with the effect
>>of that model on existing code that all-too-casually and agressively
>>eats exceptions it doesn't understand. I think there are vanishingly
>>few circumstances where a blind catch(...) without an unconditional
>>re-throw should be considered "legitimate". If you don't completely
>>understand what an exception means, you cannot claim to have
>>completely recovered, and therefore cannot reasonably finalize
>>propagation.
>>
>>
>The problems with catch(...) eating all exceptions are maybe not as
>bad as you think. As a matter of fact, there are vanishingly few
>exceptions that demand special recovery actions that wouldn't work for
>all other exceptions. Systems designed that way tend towards
>fragility.
>
>
I see an immense difference between a pragmatic statement that "in
practice there seem to be few exceptions" and something on which
cross-platform, mixed-language, modular environment programmers can
depend as a law. C++ does not say that "all exceptions can be finalized
and recovered fully by performing these steps". To presume they can is
fragile.
--
/--------------------[ David.Butenhof at hp.com ]--------------------\
| Hewlett-Packard Company Tru64 UNIX & VMS Thread Architect |
| My book: http://www.awl.com/cseng/titles/0-201-63392-2/ |
\----[ http://homepage.mac.com/dbutenhof/Threads/Threads.html ]---/
More information about the c++-pthreads
mailing list