Re: thread-safety definition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread-safety definition



Ted Baker <baker@xxxxxxxxxx> writes:

> The overhead for enabling/disabling cancellation is not paid on what
> you are calling "throw specs" until an exception is thrown
> and the code is actually executed to process the exception.
>
> It would be paid, however, on all (groups of) destructors,
> regardless of when they are executed.

Hmm.  A sufficiently clever C++ implementation could use the same
mechanisms used to search for exception handlers to determine whether
a destructor is executing at the point where the cancellation occurs,
with no runtime overhead for executing destructors.

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