thread-safety definition
David Abrahams
dave at boost-consulting.com
Thu Jan 8 15:26:00 UTC 2004
Mathieu Lacage <Mathieu.Lacage at sophia.inria.fr> 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
More information about the c++-pthreads
mailing list