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

Re: thread-safety definition



Mathieu Lacage <Mathieu.Lacage@xxxxxxxxxxxxxxx> writes:

> Indeed. For a C++ POSIX binding, I would assume you might want to make
> such a function throw an exception caught by the thread-creation
> function to unwind properly the stack. Or is this some kind of wild
> stupid idea ?

It's not stupid, unless the function isn't allowed to throw any
exceptions in standard environments.  See
http://article.gmane.org/gmane.comp.lang.c%2B%2B.pthreads/28

Functions like read() which the C++ standard allows to throw, but
which in practice never do, run a close second in stupidity if you
throw cancellation from them.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com