[c++-pthreads] Re: thread-safety definition
Ted Baker
baker at cs.fsu.edu
Mon Jan 12 11:37:39 UTC 2004
> I think it will. Even if cancellation is disabled while exceptions are
> in flight, a 'catch-everything-and-never-rethrow' block in a destructor
> will discard a cancellation exception when that destructor is triggered
> by a regular (non-exceptional, non-unwinding) exit from a block scope.
That is why you need to disable cancellation during the execution
of destructors (and C cancellation cleanup handlers).
> Call me paranoid, but as a C++ programmer, the thing that scares me most
> in the discussions on this list is a certain (perceived?) pressure to
> open the door for letting exceptions escape from destructors. Speaking
> for myself, all I can say is that such a license would break nearly
> every piece of non-trivial code I've written over the last eight years
> or so.
There is no need to let exceptions escape from destructors if you
disable cancellation during desctructor execution.
> - Wil
--Ted
More information about the c++-pthreads
mailing list