Update of /cvsroot/boost/boost/libs/thread/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3670

Modified Files:
        thread.cpp 
Log Message:
Moved the on_thread_exit call to a destructor

Index: thread.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/thread.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- thread.cpp  6 Jul 2006 13:45:13 -0000       1.22
+++ thread.cpp  6 Jul 2006 19:47:12 -0000       1.23
@@ -94,6 +94,18 @@
     bool m_started;
 };
 
+#if defined(BOOST_HAS_WINTHREADS)
+
+struct on_thread_exit_guard
+{
+    ~on_thread_exit_guard()
+    {
+        on_thread_exit();
+    }
+};
+
+#endif
+
 } // unnamed namespace
 
 extern "C" {
@@ -107,13 +119,16 @@
     {
 //        try
         {
+#if defined(BOOST_HAS_WINTHREADS)
+
+            on_thread_exit_guard guard;
+
+#endif
+
             thread_param* p = static_cast<thread_param*>(param);
             boost::function0<void> threadfunc = p->m_threadfunc;
             p->started();
             threadfunc();
-#if defined(BOOST_HAS_WINTHREADS)
-            on_thread_exit();
-#endif
         }
 //        catch (...)
 //        {


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to