[c++-pthreads] Re: FW: RE: Re: I'm Lost
David Abrahams
dave at boost-consulting.com
Thu Mar 9 16:34:13 UTC 2006
Alexander Terekhov <TEREKHOV at de.ibm.com> writes:
> The C++ language can be extended to cope with the concept of async-
> cancel safety. I can even imagine that async cancel can be made the
> default with compiler automatically inserting sync_cancel { }
> wrappers (resulting in extra map tables entries with no runtime
> penalty until attempting async cancel delivery and finding out that
> it wasn't expected) for any async-cancel unsafe expressions. I see
> no reason why tons of std lib stuff like strlen() can't be declared
> to be
>
> size_t strlen(const char *s) async_cancel_safe;
In principle, yes. In practice, it's a much bigger problem, still
requires lots of attention from the programmer to use correctly, would
place new restrictions on implementation technique that may be
extremely difficult politically to pass, and could be added atop the
answer for "synchronous" cancellation. Let's solve the "easy" problem
first. Nobody will forget about async-cancel safety and 2-phase EH as
long as you're around, Alexander.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the c++-pthreads
mailing list