Re: [c++-pthreads] Re: thread-safety definition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [c++-pthreads] Re: thread-safety definition



> >I don't really see what you think is complicated about this.  In
> >Jason's model cancellation gets reasserted as soon as a caught
> >cancellation exception is destroyed by falling off the end of the
> >catch block without rethrowing.
> 
> What if, at that point, the thread has disabled cancellation?

First, if the thread had disabled cancellation before the the
cancellation exception was raised, you could not get to this
point.  Therefore, you are only asking about the case where a
thread disables cancellation in a cleanup routine or destructor
and does not reenable it.  In this case you still want to
"reassert" the cancellation at the next point control leaves
a handler/catch block without rethrowing.

--Ted