[c++-pthreads] Re: thread-safety definition
Gabriel Dos Reis
gdr at integrable-solutions.net
Sat Jan 17 01:12:54 UTC 2004
David Abrahams <dave at boost-consulting.com> writes:
| Dave Butenhof <David.Butenhof at hp.com> writes:
|
| >>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.
|
| It also doesn't say "no destructors will throw exceptions", but we
| generally rely on them not to, because it makes programs hard to
| write. There are a whole host of things we leave up to good
| programming practice, most of which don't have to do with EH.
Agreed, but we can't specify things like that. If we assume some
working hypothesis to hold, then we have to make that assumption clear
in the specification. I think that is the point Dave Butenhof was
making.
-- Gaby
More information about the c++-pthreads
mailing list