pthread_cancel and EH: let's try this again

David Abrahams dave at boost-consulting.com
Tue Jul 12 11:44:48 UTC 2005


Alexander Terekhov <terekhov at web.de> writes:

> David Abrahams wrote:
> [...]
>> The mental model one develops for exception handling based on standard
>> C++ includes invariants such as
>> 
>>     catch(...) { whatever; throw; }
>> 
>>   is equivalent to
>> 
>>     a destructor that does "whatever" when unwinding
>
> Nah,
>
>   a destructor that does "whatever" when unwinding
>
> is equivalent to
>
>   // Doesn't participate in search phase
>   weak_catch(...) { no_throw{ whatever; } throw; }
>
> ;-)

Yeah, I definitely got a mental model for what weak_catch does based
on standard C++.  Riiiight.

No need to keep flogging that horse; I know you want new C++ features
like 2-phase EH and nothrow regions.  They probably have some
advantages especially where thread cancellation is concerned.  But
let's just keep distinct things issues in this conversation, please.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the c++-pthreads mailing list