[c++-pthreads] Re: pthread_cancel and EH: let's try this again

Nathan Myers ncm at cantrip.org
Mon Jul 18 23:21:27 UTC 2005


On Mon, Jul 18, 2005 at 02:20:10AM +0200, Alexander Terekhov wrote:
> Wil Evers wrote:
> [...]
> >      {
> >        cancellation_manager enabler(true);
> >        some_cancellation_point();
> >      }
> 
> Never do that in "library" code.

First, it's not in "library code".  It's in thread-main.

Second, when the default is to have cancellation off, design
heurisitics change accordingly.   It would be perfectly reasonable
to enable (some form of) cancellation, temporarily, inside a library 
that necessarily must have been called with it turned off.

Nathan Myers
ncm at codesourcery.com
ncm at cantrip.org




More information about the c++-pthreads mailing list