[c++-pthreads] Re: thread-safety definition

Jason Merrill jason at redhat.com
Sat Jan 17 01:17:24 UTC 2004


On Fri, 16 Jan 2004 19:41:19 -0500, David Abrahams <dave at boost-consulting.com> wrote:

> Ted Baker <baker at cs.fsu.edu> 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.

True.

Jason



More information about the c++-pthreads mailing list