[SPAM] - Re: [c++-pthreads] Re: FW: RE: Re: I'm Lost - Email found in subject

Ted Baker baker at cs.fsu.edu
Thu Mar 9 00:30:29 UTC 2006


On Wed, Mar 08, 2006 at 03:15:37PM -0800, Mark Mitchell wrote:
> 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.

This would be illegal according to the C API, since once a thread
begins executing cancellation handlers it becomes (irrevocably)
not cancellable.  That means a subsequent call to tthread_cancel
is required to have no effect on the thread.

So, if you want to do this you need a new function that is like
pthread_cancel but has special semantics.  That is, the developer
of the C++ binding would need to coordinate with the implementor
of pthread_cancel to provide this function not in the POSIX C API.

> ...  So, it seems like this ought to satisfy everyone
> from the user-level perspective.

I've been talking about the implementor-perspective.  A standard will not
be much good unless you can also persuade the implementors to buy in .

--Ted



More information about the c++-pthreads mailing list