[c++-pthreads] Re: pthread_cancel and EH: let's try this again

Mark Mitchell mark at codesourcery.com
Wed Jul 13 17:22:15 UTC 2005


Jason Merrill wrote:

> A customer of ours has code along those lines in a package that uses
> pthread_cleanup_push/pop to handle cleanups on cancellation.  It works fine
> under Solaris, tru64, and older linux systems.

If you wanted to offer a mode in which no stack unwinding was done, but 
the old just-run-pthread-cleanups semantics were honored, I would have 
no objection.  Using that mode requires a lot of care, in that the stack 
is not unwound and destructors not run, but it's a consistent model.

My objection is to a model in which "catch (...)" is ignored.

-- 
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
(916) 791-8304



More information about the c++-pthreads mailing list