Re: pthread_cancel and EH: let's try this again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pthread_cancel and EH: let's try this again
- To: c++-pthreads@xxxxxxxxxxxxxxxx
- Subject: Re: pthread_cancel and EH: let's try this again
- From: Alexander Terekhov <terekhov@xxxxxx>
- Date: Wed, 27 Jul 2005 17:16:24 +0200
Peter Dimov wrote:
[...]
> int pthread_cancelenabled(void);
>
> RETURN VALUE
>
> Nonzero if the current thread's cancelability state is PTHREAD_CANCEL_ENABLE
> and the call is not made from within a cleanup handler or a TSD destructor,
^^^^^^^^^^^^^^^^^^^^^^^^
> zero otherwise.
>
> could have been much simpler.
With cancel request pending, mandatory cancel points are required to
throw within a cleanup handler invoked by pthread_cleanup_pop() ["(if
/execute/ is non-zero)"] when cancel state is PTHREAD_CANCEL_ENABLE.
regards,
alexander.