[c++-pthreads] cancellation points report failure

Matt Austern austern at apple.com
Fri Dec 19 19:52:18 UTC 2003


On Dec 19, 2003, at 11:49 AM, Mark Mitchell wrote:

>
>> I don't like the idea of ever entirely discarding a cancellation.  If
>> a cancellation exception is thrown, caught, and discarded, I would 
>> like
>> to see it surface again at the next opportunity.  I think that means
>> that, e.g., I/O operations might be allowed in exception-handling code
>> being run during the cancellation unwind, but if one of those handlers
>> were to swallow the exception, the next I/O operation would fail or
>> throw another cancellation.  The idea is not to let the thread get
>> much further without finding cause to bubble up toward the top-level
>> caller that knows it's in a thread, and can die gracefully.
>
> I think that is a reasonable idea.
>
> I would much prefer that to (say) implicitly rethrowing cancellation
> exceptions.

My understanding is that if a particular cancellation point is disabled,
this does *not* mean that the cancellation is discarded.  It means that
it will be kept around until the next cancellation point.  (The thread 
will
never see the cancellation if it never calls a function that is a
cancellation points, but that's an inevitable consequence of
any synchronous cancellation scheme.)

			--Matt





More information about the c++-pthreads mailing list