pthread_cancel and EH: let's try this again

Alexander Terekhov terekhov at web.de
Mon Jul 18 23:51:34 UTC 2005


Nathan Myers wrote:
> 
> 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.

new_thread(library_call, arg);

Where's "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.

And how would you really turn it off (depending on client's 
need/context), then?

regards,
alexander.




More information about the c++-pthreads mailing list