thread-safety definition
David Abrahams
dave at boost-consulting.com
Sat Jan 17 00:41:19 UTC 2004
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.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the c++-pthreads
mailing list