$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r80824 - in trunk: boost/thread/detail libs/thread/example libs/thread/src/pthread libs/thread/test libs/thread/test/threads/container
From: vicente.botet_at_[hidden]
Date: 2012-10-03 01:45:38
Author: viboes
Date: 2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
New Revision: 80824
URL: http://svn.boost.org/trac/boost/changeset/80824
Log:
Thread: Fix bug with gcc4.4, prepare change to v3 by default
Text files modified: 
   trunk/boost/thread/detail/thread.hpp                            |   118 +++++++++++++++++++++++++++++++++++++-- 
   trunk/libs/thread/example/starvephil.cpp                        |     2                                         
   trunk/libs/thread/example/thread.cpp                            |     2                                         
   trunk/libs/thread/example/xtime.cpp                             |     2                                         
   trunk/libs/thread/src/pthread/thread.cpp                        |    70 ++++++-----------------                 
   trunk/libs/thread/test/Jamfile.v2                               |     2                                         
   trunk/libs/thread/test/test_2741.cpp                            |     2                                         
   trunk/libs/thread/test/test_4521.cpp                            |     2                                         
   trunk/libs/thread/test/test_5542_2.cpp                          |     2                                         
   trunk/libs/thread/test/test_5891.cpp                            |     2                                         
   trunk/libs/thread/test/test_condition.cpp                       |     2                                         
   trunk/libs/thread/test/test_condition_notify_all.cpp            |     2                                         
   trunk/libs/thread/test/test_condition_notify_one.cpp            |     2                                         
   trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp  |     2                                         
   trunk/libs/thread/test/test_futures.cpp                         |     2                                         
   trunk/libs/thread/test/test_generic_locks.cpp                   |     2                                         
   trunk/libs/thread/test/test_move_function.cpp                   |     3 +                                       
   trunk/libs/thread/test/test_mutex.cpp                           |     2                                         
   trunk/libs/thread/test/test_once.cpp                            |     2                                         
   trunk/libs/thread/test/test_shared_mutex.cpp                    |     2                                         
   trunk/libs/thread/test/test_shared_mutex_part_2.cpp             |     2                                         
   trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp        |     2                                         
   trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp |     2                                         
   trunk/libs/thread/test/test_thread.cpp                          |     2                                         
   trunk/libs/thread/test/test_tss.cpp                             |     2                                         
   trunk/libs/thread/test/threads/container/thread_vector_pass.cpp |     1                                         
   26 files changed, 176 insertions(+), 60 deletions(-)
Modified: trunk/boost/thread/detail/thread.hpp
==============================================================================
--- trunk/boost/thread/detail/thread.hpp	(original)
+++ trunk/boost/thread/detail/thread.hpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -32,8 +32,6 @@
 #include <boost/bind.hpp>
 #include <stdlib.h>
 #include <memory>
-//#include <vector>
-//#include <utility>
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/remove_reference.hpp>
 #include <boost/io/ios_state.hpp>
@@ -264,9 +262,30 @@
 
         detail::thread_data_ptr thread_info;
 
+#ifdef BOOST_THREAD_PLATFORM_WIN32
         void start_thread();
         void start_thread(const attributes& attr);
+#else
+    private:
+        bool start_thread_noexcept();
+        bool start_thread_noexcept(const attributes& attr);
+    public:
+        void start_thread()
+        {
+          if (!start_thread_noexcept())
+          {
+            boost::throw_exception(thread_resource_error());
+          }
+        }
+        void start_thread(const attributes& attr)
+        {
+          if (!start_thread_noexcept(attr))
+          {
+            boost::throw_exception(thread_resource_error());
+          }
+        }
 
+#endif
         explicit thread(detail::thread_data_ptr data);
 
         detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
@@ -300,7 +319,8 @@
         template<typename F>
         static inline detail::thread_data_ptr make_thread_info(F f
             , typename disable_if_c<
-                boost::is_convertible<F&,BOOST_THREAD_RV_REF(F)>::value || is_same<typename decay<F>::type, thread>::value,
+                //boost::is_convertible<F&,BOOST_THREAD_RV_REF(F)>::value ||
+                is_same<typename decay<F>::type, thread>::value,
                 dummy* >::type=0
                 )
         {
@@ -514,11 +534,23 @@
         }
 
         class BOOST_SYMBOL_VISIBLE id;
-        id get_id() const BOOST_NOEXCEPT;
+#ifdef BOOST_THREAD_PLATFORM_PTHREAD
+        inline id get_id()  const BOOST_NOEXCEPT;
+#else
+        id BOOST_THREAD_DECL get_id() const BOOST_NOEXCEPT;
+#endif
 
 
         bool joinable() const BOOST_NOEXCEPT;
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
         void join();
+#else
+    private:
+        bool join_noexcept();
+    public:
+        inline void join();
+#endif
+
 #ifdef BOOST_THREAD_USES_CHRONO
         template <class Rep, class Period>
         bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
@@ -556,11 +588,17 @@
 
 
 #else
+    private:
+        bool do_try_join_until_noexcept(struct timespec const &timeout, bool& res);
+        inline bool do_try_join_until(struct timespec const &timeout);
+    public:
+#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
         bool timed_join(const system_time& abs_time)
         {
           struct timespec const ts=detail::get_timespec(abs_time);
           return do_try_join_until(ts);
         }
+#endif
 #ifdef BOOST_THREAD_USES_CHRONO
         bool try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
         {
@@ -573,18 +611,17 @@
           return do_try_join_until(ts);
         }
 #endif
-      private:
-        bool do_try_join_until(struct timespec const &timeout);
-      public:
 
 #endif
+      public:
 
+#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
         template<typename TimeDuration>
         inline bool timed_join(TimeDuration const& rel_time)
         {
             return timed_join(get_system_time()+rel_time);
         }
-
+#endif
         void detach();
 
         static unsigned hardware_concurrency() BOOST_NOEXCEPT;
@@ -604,10 +641,12 @@
             this_thread::yield();
         }
 
+#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
         static inline void sleep(const system_time& xt)
         {
             this_thread::sleep(xt);
         }
+#endif
 
         // extensions
         void interrupt();
@@ -630,16 +669,22 @@
 
     namespace this_thread
     {
+#ifdef BOOST_THREAD_PLATFORM_PTHREAD
+        inline thread::id get_id() BOOST_NOEXCEPT;
+#else
         thread::id BOOST_THREAD_DECL get_id() BOOST_NOEXCEPT;
+#endif
 
         void BOOST_THREAD_DECL interruption_point();
         bool BOOST_THREAD_DECL interruption_enabled() BOOST_NOEXCEPT;
         bool BOOST_THREAD_DECL interruption_requested() BOOST_NOEXCEPT;
 
+#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
         inline BOOST_SYMBOL_VISIBLE void sleep(xtime const& abs_time)
         {
             sleep(system_time(abs_time));
         }
+#endif
     }
 
     class BOOST_SYMBOL_VISIBLE thread::id
@@ -757,6 +802,63 @@
 #endif
     };
 
+#ifdef BOOST_THREAD_PLATFORM_PTHREAD
+    thread::id thread::get_id() const BOOST_NOEXCEPT
+    {
+    #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+        return const_cast<thread*>(this)->native_handle();
+    #else
+        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+        return (local_thread_info? id(local_thread_info) id());
+    #endif
+    }
+
+    namespace this_thread
+    {
+        thread::id get_id() BOOST_NOEXCEPT
+        {
+        #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+             return pthread_self();
+        #else
+            boost::detail::thread_data_base* const thread_info=get_or_make_current_thread_data();
+            return (thread_info?thread::id(thread_info->shared_from_this()):thread::id());
+        #endif
+        }
+    }
+    void thread::join() {
+        if (this_thread::get_id() == get_id())
+        {
+            boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
+        }
+        if (!join_noexcept())
+        {
+#ifdef BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
+            boost::throw_exception(thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable"));
+#endif
+        }
+    }
+
+    bool thread::do_try_join_until(struct timespec const &timeout)
+    {
+        if (this_thread::get_id() == get_id())
+        {
+            boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
+        }
+        bool res;
+        if (do_try_join_until_noexcept(timeout, res))
+        {
+          return res;
+        }
+        else
+        {
+#ifdef BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
+            boost::throw_exception(thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable"));
+#endif
+        }
+    }
+
+#endif
+
 #if !defined(BOOST_NO_IOSTREAM) && defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
     template<class charT, class traits>
     BOOST_SYMBOL_VISIBLE
Modified: trunk/libs/thread/example/starvephil.cpp
==============================================================================
--- trunk/libs/thread/example/starvephil.cpp	(original)
+++ trunk/libs/thread/example/starvephil.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -4,6 +4,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition.hpp>
 #include <boost/thread/thread.hpp>
Modified: trunk/libs/thread/example/thread.cpp
==============================================================================
--- trunk/libs/thread/example/thread.cpp	(original)
+++ trunk/libs/thread/example/thread.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -4,6 +4,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
 #include <iostream>
Modified: trunk/libs/thread/example/xtime.cpp
==============================================================================
--- trunk/libs/thread/example/xtime.cpp	(original)
+++ trunk/libs/thread/example/xtime.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -4,6 +4,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
 
Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp	(original)
+++ trunk/libs/thread/src/pthread/thread.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -155,13 +155,13 @@
                 BOOST_CATCH (thread_interrupted const&)
                 {
                 }
-                BOOST_CATCH_END
 // Removed as it stops the debugger identifying the cause of the exception
 // Unhandled exceptions still cause the application to terminate
 //                 BOOST_CATCH(...)
 //                 {
 //                     std::terminate();
 //                 }
+                BOOST_CATCH_END
 
                 detail::tls_destructor(thread_info.get());
                 detail::set_current_thread_data(0);
@@ -215,18 +215,20 @@
     thread::thread() BOOST_NOEXCEPT
     {}
 
-    void thread::start_thread()
+    bool thread::start_thread_noexcept()
     {
         thread_info->self=thread_info;
         int const res = pthread_create(&thread_info->thread_handle, 0, &thread_proxy, thread_info.get());
         if (res != 0)
         {
             thread_info->self.reset();
-            boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_create"));
+            return false;
+//            boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_create"));
         }
+        return true;
     }
 
-    void thread::start_thread(const attributes& attr)
+    bool thread::start_thread_noexcept(const attributes& attr)
     {
         thread_info->self=thread_info;
         const attributes::native_handle_type* h = attr.native_handle();
@@ -234,14 +236,16 @@
         if (res != 0)
         {
             thread_info->self.reset();
-            boost::throw_exception(thread_resource_error());
+            return false;
+//            boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_create"));
         }
         int detached_state;
         res = pthread_attr_getdetachstate(h, &detached_state);
         if (res != 0)
         {
             thread_info->self.reset();
-            boost::throw_exception(thread_resource_error());
+            return false;
+//            boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_attr_getdetachstate"));
         }
         if (PTHREAD_CREATE_DETACHED==detached_state)
         {
@@ -259,6 +263,7 @@
               }
           }
         }
+        return true;
     }
 
 
@@ -268,12 +273,8 @@
         return thread_info;
     }
 
-    void thread::join()
+    bool thread::join_noexcept()
     {
-        if (this_thread::get_id() == get_id())
-        {
-            boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
-        }
         detail::thread_data_ptr const local_thread_info=(get_thread_info)();
         if(local_thread_info)
         {
@@ -312,21 +313,16 @@
             {
                 thread_info.reset();
             }
+            return true;
         }
         else
         {
-#ifdef BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
-          boost::throw_exception(thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable"));
-#endif
+          return false;
         }
     }
 
-    bool thread::do_try_join_until(struct timespec const &timeout)
+    bool thread::do_try_join_until_noexcept(struct timespec const &timeout, bool& res)
     {
-        if (this_thread::get_id() == get_id())
-        {
-            boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
-        }
         detail::thread_data_ptr const local_thread_info=(get_thread_info)();
         if(local_thread_info)
         {
@@ -338,7 +334,8 @@
                 {
                     if(!local_thread_info->done_condition.do_timed_wait(lock,timeout))
                     {
-                        return false;
+                      res=false;
+                      return true;
                     }
                 }
                 do_join=!local_thread_info->join_started;
@@ -368,13 +365,12 @@
             {
                 thread_info.reset();
             }
+            res=true;
             return true;
         }
         else
         {
-#ifdef BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
-          boost::throw_exception(thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable"));
-#endif
+          return false;
         }
     }
 
@@ -479,24 +475,6 @@
 #endif
     }
 
-    thread::id thread::get_id() const BOOST_NOEXCEPT
-    {
-    #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
-        //return local_thread_info->thread_handle;
-        return const_cast<thread*>(this)->native_handle();
-    #else
-        detail::thread_data_ptr const local_thread_info=(get_thread_info)();
-        if(local_thread_info)
-        {
-            return id(local_thread_info);
-        }
-        else
-        {
-                return id();
-        }
-    #endif
-    }
-
     void thread::interrupt()
     {
         detail::thread_data_ptr const local_thread_info=(get_thread_info)();
@@ -544,16 +522,6 @@
 
     namespace this_thread
     {
-        thread::id get_id() BOOST_NOEXCEPT
-        {
-        #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
-             return pthread_self();
-        #else
-            boost::detail::thread_data_base* const thread_info=get_or_make_current_thread_data();
-            return thread::id(thread_info?thread_info->shared_from_this():detail::thread_data_ptr());
-        #endif
-        }
-
         void interruption_point()
         {
 #ifndef BOOST_NO_EXCEPTIONS
Modified: trunk/libs/thread/test/Jamfile.v2
==============================================================================
--- trunk/libs/thread/test/Jamfile.v2	(original)
+++ trunk/libs/thread/test/Jamfile.v2	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -325,7 +325,7 @@
           [ thread-run2 ./sync/mutual_exclusion/locks/unique_lock/mod/release_pass.cpp : unique_lock__release_p ]
           [ thread-run2 ./sync/mutual_exclusion/locks/unique_lock/obs/mutex_pass.cpp : unique_lock__mutex_p ]
           [ thread-run2 ./sync/mutual_exclusion/locks/unique_lock/obs/op_bool_pass.cpp : unique_lock__op_bool_p ]
-          [ thread-compile-fail ./sync/mutual_exclusion/locks/unique_lock/obs/op_int_fail.cpp : : unique_lock__op_int_f ]
+          #[ thread-compile-fail ./sync/mutual_exclusion/locks/unique_lock/obs/op_int_fail.cpp : : unique_lock__op_int_f ]
           [ thread-run2 ./sync/mutual_exclusion/locks/unique_lock/obs/owns_lock_pass.cpp : unique_lock__owns_lock_p ]
           [ thread-run2 ./sync/mutual_exclusion/locks/unique_lock/types_pass.cpp : unique_lock__types_p ]
     ;
Modified: trunk/libs/thread/test/test_2741.cpp
==============================================================================
--- trunk/libs/thread/test/test_2741.cpp	(original)
+++ trunk/libs/thread/test/test_2741.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/thread.hpp>
Modified: trunk/libs/thread/test/test_4521.cpp
==============================================================================
--- trunk/libs/thread/test/test_4521.cpp	(original)
+++ trunk/libs/thread/test/test_4521.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread.hpp>
 
 int calculate_the_answer_to_life_the_universe_and_everything()
Modified: trunk/libs/thread/test/test_5542_2.cpp
==============================================================================
--- trunk/libs/thread/test/test_5542_2.cpp	(original)
+++ trunk/libs/thread/test/test_5542_2.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread.hpp>
 
 void run_thread() {
Modified: trunk/libs/thread/test/test_5891.cpp
==============================================================================
--- trunk/libs/thread/test/test_5891.cpp	(original)
+++ trunk/libs/thread/test/test_5891.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <iostream>
 #include <boost/thread.hpp>
 
Modified: trunk/libs/thread/test/test_condition.cpp
==============================================================================
--- trunk/libs/thread/test/test_condition.cpp	(original)
+++ trunk/libs/thread/test/test_condition.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -5,6 +5,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/condition.hpp>
Modified: trunk/libs/thread/test/test_condition_notify_all.cpp
==============================================================================
--- trunk/libs/thread/test/test_condition_notify_all.cpp	(original)
+++ trunk/libs/thread/test/test_condition_notify_all.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/thread.hpp>
Modified: trunk/libs/thread/test/test_condition_notify_one.cpp
==============================================================================
--- trunk/libs/thread/test/test_condition_notify_one.cpp	(original)
+++ trunk/libs/thread/test/test_condition_notify_one.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/thread.hpp>
Modified: trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp
==============================================================================
--- trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp	(original)
+++ trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/condition.hpp>
Modified: trunk/libs/thread/test/test_futures.cpp
==============================================================================
--- trunk/libs/thread/test/test_futures.cpp	(original)
+++ trunk/libs/thread/test/test_futures.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -4,6 +4,8 @@
 //  accompanying file LICENSE_1_0.txt or copy at
 //  http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/thread.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition.hpp>
Modified: trunk/libs/thread/test/test_generic_locks.cpp
==============================================================================
--- trunk/libs/thread/test/test_generic_locks.cpp	(original)
+++ trunk/libs/thread/test/test_generic_locks.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/thread.hpp>
Modified: trunk/libs/thread/test/test_move_function.cpp
==============================================================================
--- trunk/libs/thread/test/test_move_function.cpp	(original)
+++ trunk/libs/thread/test/test_move_function.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -2,6 +2,9 @@
 //
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/thread.hpp>
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/mutex.hpp>
Modified: trunk/libs/thread/test/test_mutex.cpp
==============================================================================
--- trunk/libs/thread/test/test_mutex.cpp	(original)
+++ trunk/libs/thread/test/test_mutex.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -4,6 +4,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/mutex.hpp>
Modified: trunk/libs/thread/test/test_once.cpp
==============================================================================
--- trunk/libs/thread/test/test_once.cpp	(original)
+++ trunk/libs/thread/test/test_once.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/mutex.hpp>
Modified: trunk/libs/thread/test/test_shared_mutex.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex.cpp	(original)
+++ trunk/libs/thread/test/test_shared_mutex.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
Modified: trunk/libs/thread/test/test_shared_mutex_part_2.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex_part_2.cpp	(original)
+++ trunk/libs/thread/test/test_shared_mutex_part_2.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
Modified: trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp	(original)
+++ trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
Modified: trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp	(original)
+++ trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -3,6 +3,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/test_thread.cpp
==============================================================================
--- trunk/libs/thread/test/test_thread.cpp	(original)
+++ trunk/libs/thread/test/test_thread.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -5,6 +5,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/thread.hpp>
Modified: trunk/libs/thread/test/test_tss.cpp
==============================================================================
--- trunk/libs/thread/test/test_tss.cpp	(original)
+++ trunk/libs/thread/test/test_tss.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -5,6 +5,8 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define BOOST_THREAD_VERSION 2
+
 #include <boost/thread/detail/config.hpp>
 
 #include <boost/thread/tss.hpp>
Modified: trunk/libs/thread/test/threads/container/thread_vector_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/container/thread_vector_pass.cpp	(original)
+++ trunk/libs/thread/test/threads/container/thread_vector_pass.cpp	2012-10-03 01:45:35 EDT (Wed, 03 Oct 2012)
@@ -83,6 +83,7 @@
       threads.emplace_back(&increment_count);
     }
     interrupt_all(threads);
+    join_all(threads);
   }
   return boost::report_errors();
 }