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

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



On Fri, 16 Jan 2004 19:41:19 -0500, David Abrahams <dave@xxxxxxxxxxxxxxxxxxxx> wrote:

> 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.

True.

Jason