catch(...) and forced unwind
Mark Mitchell
mark@codesourcery.com
Wed Dec 17 22:43:00 GMT 2003
On Wed, 2003-12-17 at 12:30, Richard Henderson wrote:
> On Wed, Dec 17, 2003 at 10:36:15AM -0800, Mark Mitchell wrote:
> > That would also be a POSIX threads extension; essentially, this would be
> > the deferred cancellation model, except that pthread_testcancel would be
> > the only cancellation point.
>
> I would think that disabling cancellation and then using testcancel
> would be equivalent.
I don't think so; pthread_setcancelstate (PTHREAD_CANCEL_DISABLE) means
that the thread will not receive cancellation requests at all.
What David was proposing was that the cancellation request would be
received, but queued until pthread_testcancel was called. In
particular, "write" and such would not be cancellation points.
--
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC
More information about the Gcc
mailing list