[c++-pthreads] Re: FW: RE: Re: I'm Lost

Alexander Terekhov TEREKHOV at de.ibm.com
Thu Mar 9 08:56:13 UTC 2006


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;

regards,
alexander.


"Peter Dimov" <pdimov at mmltd.net> on 08.03.2006 22:44:45

To:    "Dave Butenhof" <david.butenhof at hp.com>, "David Abrahams"
       <dave at boost-consulting.com>
cc:    "Meredith, Alisdair" <Alisdair.Meredith at uk.renaultf1.com>,
       <c++-pthreads at codesourcery.com>
Subject:    Re: [c++-pthreads]  Re: FW: RE: Re: I'm Lost


Dave Butenhof wrote:

> So, yeah; the exception is synchronous. Fine. But that's only the
> final, and least interesting, step in the protocol. Or perhaps that's
> just "least interesting" to ME, because "I'm a thread guy". ;-)

It is a very interesting step because that's what the thread sees, an
ordinary exception, emanating from a function in the usual way; meaning
that
if the thread is already equipped to handle exceptions, as is the case with

C++ code nowadays, it "just works". Which is nice. :-)






More information about the c++-pthreads mailing list