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

Nathan Myers ncm at cantrip.org
Mon Jul 18 09:18:10 UTC 2005


On Mon, Jul 18, 2005 at 10:57:30AM +0200, Alexander Terekhov wrote:
> 
> Nathan Myers wrote:
> > 
> > On Mon, Jul 18, 2005 at 02:15:35AM +0300, Peter Dimov wrote:
> > > Nathan Myers wrote:
> > >
> > > >2. Existing thread-safe and exception-safe C and C++ libraries
> > > >that do *not* take cancellation into account should still work.
> > >
> > > Even when cancelled?
> > 
> > Of course.  Otherwise what's the point? [... ECANCELED ...]
> 
> That's impossible. 

Alexander, please pay attention.  If, per Wil's proposal, any response 
to cancellation whatsoever is disabled by default, then absent specific 
action by the user *all* code will execute exactly as if no
cancellation happened.  If users add a degree of responsiveness to 
certain regions of code (anything between "certain system calls report 
failure" on up to "pretend this is POSiX C and hope for the best"), a 
wide variety of existing libraries may be accommodated safely.  Yes, 
thread termination might be delayed -- maybe even indefinitely -- but 
that's safe.  Users who need more responsiveness will know what to do.

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



More information about the c++-pthreads mailing list