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

Nathan Sidwell nathan at codesourcery.com
Wed Jul 13 14:35:30 UTC 2005


Jason Merrill wrote:
> OK, let me clarify my position.  For a new C++ threading library, I would
> continue to prefer scheme #1.  But this isn't a new library, it's an
> extension of an existing library.

thanks for this rationale.  I better understand the problem that needs to be 
solved now.

> Compatibility with existing pthreads code is more important than
> consistency with C++ exceptions.

Another point of interest, which I'm sure you've considered, is that standard C 
functions such as write are deemed to be nothrow by C++, yet are cancellation 
points in pthreads.  Scheme #2 stops this blowing up (by deferring cancellation 
inside such function).  Scheme #1 blows up by calling std::unexpected.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan at codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the c++-pthreads mailing list