[c++-pthreads] Re: FW: RE: Re: I'm Lost

Mark Mitchell mark at codesourcery.com
Wed Mar 8 23:15:37 UTC 2006


Jason Merrill wrote:

> If you can interrupt cancellation, re-cancellation is implemented
> trivially simply by just having the cancellation exception destructor
> call 'pthread_cancel (pthread_self ())'.  The sticking point is being
> able to abort the cancellation in the first place, which is what Uli has
> been opposed to.

It sounds like we really are close to a solution then; I think everyone
here would be happy with the re-cancellation thing, and the destructor
trick means that there's really no way the thread can permanently
discard the cancellation request, short of things like longjmp -- and,
of course, if the thread is really determined not to go away it can just
hang around anyhow.  So, it seems like this ought to satisfy everyone
from the user-level perspective.

> I don't think he's opposed to catching it, just to doing anything that
> would involve backing out of the cancellation once it's started.

Would the above satisfy him?

-- 
Mark Mitchell
CodeSourcery
mark at codesourcery.com
(650) 331-3385 x713



More information about the c++-pthreads mailing list