pthread_cancel and EH: let's try this again

Alexander Terekhov terekhov at web.de
Tue Jul 19 20:02:44 UTC 2005


Wil Evers wrote:
> 
> Alexander Terekhov wrote:
> 
> > When cancellation is been disabled by X's client, it doesn't matter
> > whether cancellation is "sticky" or not "sticky" because it's been
> > suppressed entirely by X's client.
> 
> That's odd.  I always thought that a cancellation request would be
> remembered until the target thread enables cancellation, 

Request is remembered but cancellation remains "suppressed entirely"
as long as it remains disabled. Pending cancel is guaranteed to fire 
when the target has its cancellation enabled and hits a "shall occur" 
cancellation point. Pending cancel may also fire when the target has 
its cancellation enabled and hits a "may also occur" cancellation 
point. Pending cancel may also fire at any point within async.cancel
region when the target has its cancellation enabled. 

>                                                          while you seem
> to suggest the cancellation request is simply ignored when the target
> thread runs with cancellation disabled.

It depends on what you main by "ignored". See above.

regards,
alexander.




More information about the c++-pthreads mailing list