Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75904 - trunk/libs/thread/doc
From: vicente.botet_at_[hidden]
Date: 2011-12-11 13:12:56


Author: viboes
Date: 2011-12-11 13:12:55 EST (Sun, 11 Dec 2011)
New Revision: 75904
URL: http://svn.boost.org/trac/boost/changeset/75904

Log:
Thread: #5013 - documentation: boost::thread: pthreas_exit causes terminate()
Text files modified:
   trunk/libs/thread/doc/thread_ref.qbk | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/libs/thread/doc/thread_ref.qbk
==============================================================================
--- trunk/libs/thread/doc/thread_ref.qbk (original)
+++ trunk/libs/thread/doc/thread_ref.qbk 2011-12-11 13:12:55 EST (Sun, 11 Dec 2011)
@@ -201,6 +201,12 @@
 
 As the single way to interrupt a thread is through a __thread__ instance, `interruption_request()` wiil returns false for the native threads.
 
+[heading `pthread_exit` POSIX limitation]
+
+`pthread_exit` in glibc/NPTL causes a "forced unwind" that is almost like a C++ exception, but not quite. On Mac OS X, for example, `pthread_exit` unwinds without calling C++ destructors.
+
+This behavior is incompatible with the current Boost.Thread design, so the use of this function in a POSIX thread result in undefined behavior of any Boost.Thread function.
+
 [section:thread Class `thread`]
 
     #include <boost/thread/thread.hpp>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk