[c++-pthreads] Re: thread-safety definition
Dave Butenhof
David.Butenhof at hp.com
Thu Jan 8 16:07:34 UTC 2004
Wil Evers wrote:
> Dave Butenhof wrote:
>
>> If cancel is implemented completely as a "full stature" C++
>> exception, and none of the "exception safe" code does anything silly
>> like "catch(...)" without a re-throw, then, yes, it's likely to be
>> reasonably cancel-safe.
>
> A catch(...) without a re-throw isn't necessarily a silly thing to do,
> especially in a destructor. Sometimes, the only alternative is to
> risk a call to terminate().
But it still breaks cancellation. Again, ignoring cancel entirely may be
"cancel safe" in some trivial sense, but it's not useful or reasonable
under nearly all circumstances.
--
/--------------------[ 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