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

Nathan Sidwell nathan at codesourcery.com
Fri Jul 15 10:50:21 UTC 2005


Jason Merrill wrote:

> It's not that subtle, it just does stack unwinding, like a sequence of
> returns.

two parts of scheme #2 is unclear to me.  If a cancellation is initiated inside 
a nothrow function, the cancellation is deferred until the nothrow function is 
exited. correct?

question 1.  What if the function is, say, throw (X)?  do we delay cancellation?

question 2.  What if the active function is not nothrow, but is called from a 
nothrow function (containing suitable try .. catch).  Do we delay cancellation? 
  The caller of the intermediate nothrow function might well been optimized base 
on the knowledge that no unwinding will occur out of the called function. 
Perhaps I'm just restating the original question here :)

What I find inconsistent is that if the cancellation is deferred when the active 
function is nothrow, why is it not delayed when any function in the call stack 
is nothrow?

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