|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77789 - in trunk: boost/thread boost/thread/detail boost/thread/pthread libs/thread/doc libs/thread/test libs/thread/test/sync/futures/future libs/thread/test/sync/futures/promise libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons libs/thread/test/threads/thread/assign libs/thread/test/threads/thread/destr
From: vicente.botet_at_[hidden]
Date: 2012-04-05 18:39:26
Author: viboes
Date: 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
New Revision: 77789
URL: http://svn.boost.org/trac/boost/changeset/77789
Log:
Thread: rename macros and try to fix some failing sun test
Text files modified:
trunk/boost/thread/detail/config.hpp | 32 +++++-----
trunk/boost/thread/detail/thread.hpp | 8 +-
trunk/boost/thread/future.hpp | 8 +-
trunk/boost/thread/locks.hpp | 6 +-
trunk/boost/thread/pthread/shared_mutex.hpp | 4
trunk/boost/thread/shared_mutex.hpp | 4
trunk/libs/thread/doc/changes.qbk | 4
trunk/libs/thread/doc/compliance.qbk | 2
trunk/libs/thread/doc/condition_variables.qbk | 48 ++++++---------
trunk/libs/thread/doc/configuration.qbk | 115 ++++++++++++++++++++++++++++++---------
trunk/libs/thread/doc/future_ref.qbk | 18 ++++-
trunk/libs/thread/doc/mutex_concepts.qbk | 55 ++++++++++--------
trunk/libs/thread/doc/mutexes.qbk | 20 ++++--
trunk/libs/thread/doc/once.qbk | 31 ++++++++--
trunk/libs/thread/doc/shared_mutex_ref.qbk | 32 ++++++++---
trunk/libs/thread/doc/thread_ref.qbk | 25 ++++++--
trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp | 4
trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp | 1
trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp | 1
trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp | 2
trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp | 2
trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp | 2
trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp | 17 ++---
trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp | 17 ++---
trunk/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp | 2
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp | 2
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_for_pass.cpp | 4
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_try_pass.cpp | 4
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_until_pass.cpp | 4
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_for_pass.cpp | 2
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_try_pass.cpp | 2
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_until_pass.cpp | 2
trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp | 2
trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/duration_pass.cpp | 2
trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_for_pass.cpp | 4
trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_try_pass.cpp | 4
trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_until_pass.cpp | 4
trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/time_point_pass.cpp | 2
trunk/libs/thread/test/test_4521.cpp | 2
trunk/libs/thread/test/threads/thread/assign/move_pass.cpp | 2
trunk/libs/thread/test/threads/thread/destr/dtor_pass.cpp | 2
41 files changed, 310 insertions(+), 194 deletions(-)
Modified: trunk/boost/thread/detail/config.hpp
==============================================================================
--- trunk/boost/thread/detail/config.hpp (original)
+++ trunk/boost/thread/detail/config.hpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -41,11 +41,6 @@
#define BOOST_THREAD_USES_CHRONO
#endif
-// BOOST_THREAD_SHARED_MUTEX_GENERIC is defined if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
-#if defined BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
-#endif
-
// Don't provided by default in version 1.
#if defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
#define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION explicit
@@ -72,32 +67,37 @@
#if ! defined BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11
#define BOOST_THREAD_PROVIDES_ONCE_CXX11
#endif
-#if ! defined BOOST_THREAD_DONT_PROVIDE_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
-#define BOOST_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
#endif
-#if ! defined BOOST_THREAD_DONT_PROVIDE_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
-#define BOOST_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
#endif
-#if ! defined BOOST_THREAD_DONT_PROVIDE_USES_FUTURE
-#define BOOST_THREAD_USES_FUTURE
+#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE
+#define BOOST_THREAD_PROVIDES_FUTURE
#endif
#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
-#define BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#define BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#endif
-#if ! defined BOOST_THREAD_SHARED_MUTEX_DONT_PROVIDE_UPWARDS_CONVERSIONS
-#define BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#if ! defined BOOST_THREAD_DONT_PROVIDE_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#endif
#if ! defined BOOST_THREAD_DONT_PROVIDE_EXPLICIT_LOCK_CONVERSION
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
#endif
-#if ! defined BOOST_THREAD_DONT_PROVIDE_SHARED_MUTEX_GENERIC
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#if ! defined BOOST_THREAD_DONT_PROVIDE_GENERIC_SHARED_MUTEX_ON_WIN
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#endif
#if ! defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
#define BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
#endif
#endif
+// BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN is defined if BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#if defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#endif
+
// BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 defined by default up to Boost 1.52
// BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 defined by default up to Boost 1.55
#if ! defined BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
Modified: trunk/boost/thread/detail/thread.hpp
==============================================================================
--- trunk/boost/thread/detail/thread.hpp (original)
+++ trunk/boost/thread/detail/thread.hpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -210,7 +210,7 @@
thread() BOOST_NOEXCEPT;
~thread()
{
- #if defined BOOST_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+ #if defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
if (joinable()) {
std::terminate();
}
@@ -247,7 +247,7 @@
thread& operator=(thread&& other) BOOST_NOEXCEPT
{
-#if defined BOOST_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#if defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
if (joinable()) std::terminate();
#endif
thread_info=other.thread_info;
@@ -365,7 +365,7 @@
#if defined BOOST_THREAD_USES_MOVE
thread& operator=(boost::rv<thread>& x) BOOST_NOEXCEPT
{
-#if defined BOOST_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#if defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
if (joinable()) std::terminate();
#endif
thread new_thread(boost::move(x));
@@ -375,7 +375,7 @@
#else
thread& operator=(detail::thread_move_t<thread> x) BOOST_NOEXCEPT
{
-#if defined BOOST_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#if defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
if (joinable()) std::terminate();
#endif
thread new_thread(x);
Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -36,11 +36,11 @@
#include <boost/chrono/system_clocks.hpp>
#endif
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include <boost/thread/detail/memory.hpp>
#endif
-#if defined BOOST_THREAD_USES_FUTURE
+#if defined BOOST_THREAD_PROVIDES_FUTURE
#define BOOST_THREAD_FUTURE future
#else
#define BOOST_THREAD_FUTURE unique_future
@@ -1272,7 +1272,7 @@
}
public:
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
template <class Allocator>
explicit promise(boost::allocator_arg_t, Allocator a)
{
@@ -1478,7 +1478,7 @@
#endif
}
public:
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
template <class Allocator>
explicit promise(boost::allocator_arg_t, Allocator a)
{
Modified: trunk/boost/thread/locks.hpp
==============================================================================
--- trunk/boost/thread/locks.hpp (original)
+++ trunk/boost/thread/locks.hpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -640,7 +640,7 @@
#endif
#endif
-#ifdef BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#ifndef BOOST_NO_RVALUE_REFERENCES
// Conversion from shared locking
unique_lock(shared_lock<mutex_type>&& sl, try_to_lock_t)
@@ -1584,7 +1584,7 @@
#endif
#endif
-#ifdef BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONSS
#ifndef BOOST_NO_RVALUE_REFERENCES
// Conversion from shared locking
@@ -1949,7 +1949,7 @@
{
if(source)
{
- *source=upgrade_lock<Mutex>(::boost::move(exclusive));
+ *source=BOOST_EXPLICIT_MOVE(upgrade_lock<Mutex>(::boost::move(exclusive)));
}
}
Modified: trunk/boost/thread/pthread/shared_mutex.hpp
==============================================================================
--- trunk/boost/thread/pthread/shared_mutex.hpp (original)
+++ trunk/boost/thread/pthread/shared_mutex.hpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -437,7 +437,7 @@
release_waiters();
}
-#ifdef BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
bool try_unlock_shared_and_lock()
{
boost::mutex::scoped_lock lk(state_change);
@@ -497,7 +497,7 @@
release_waiters();
}
-#ifdef BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
bool try_unlock_shared_and_lock_upgrade()
{
boost::mutex::scoped_lock lk(state_change);
Modified: trunk/boost/thread/shared_mutex.hpp
==============================================================================
--- trunk/boost/thread/shared_mutex.hpp (original)
+++ trunk/boost/thread/shared_mutex.hpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -3,7 +3,7 @@
// shared_mutex.hpp
//
-// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2007 Anthony Williams
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -11,7 +11,7 @@
#include <boost/thread/detail/platform.hpp>
#if defined(BOOST_THREAD_PLATFORM_WIN32)
-#if defined(BOOST_THREAD_SHARED_MUTEX_GENERIC)
+#if defined(BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN)
#include <boost/thread/pthread/shared_mutex.hpp>
#else
#include <boost/thread/win32/shared_mutex.hpp>
Modified: trunk/libs/thread/doc/changes.qbk
==============================================================================
--- trunk/libs/thread/doc/changes.qbk (original)
+++ trunk/libs/thread/doc/changes.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -28,6 +28,7 @@
* [@http://svn.boost.org/trac/boost/ticket/6272 #6272] c++11 compliance: Add thread::id hash specialization.
* [@http://svn.boost.org/trac/boost/ticket/6273 #6273] c++11 compliance: Add cv_status enum class and use it on the conditions wait functions.
* [@http://svn.boost.org/trac/boost/ticket/6231 #6231] Add BasicLockable requirements in the documentation to follow c++11.
+* [@http://svn.boost.org/trac/boost/ticket/6342 #6342] c++11 compliance: Adapt the one_flag and call_once to the c++11 interface.
* [@http://svn.boost.org/trac/boost/ticket/6671 #6671] upgrade_lock: missing mutex and release functions.
* [@http://svn.boost.org/trac/boost/ticket/6672 #6672] upgrade_lock:: missing constructors from time related types.
* [@http://svn.boost.org/trac/boost/ticket/6675 #6675] upgrade_lock:: missing non-member swap.
@@ -42,6 +43,7 @@
* [@http://svn.boost.org/trac/boost/ticket/5516 #5516] Upgrade lock is not acquired when previous upgrade lock releases if another read lock is present.
* [@http://svn.boost.org/trac/boost/ticket/5990 #5990] shared_future<T>::get() has wrong return type.
* [@http://svn.boost.org/trac/boost/ticket/6174 #6174] packaged_task doesn't correctly handle moving results.
+* [@http://svn.boost.org/trac/boost/ticket/6222 #6222] Compile error with SunStudio: unique_future move.
* [@http://svn.boost.org/trac/boost/ticket/6673 #6673] shared_lock: move assign doesn't works with c++11.
* [@http://svn.boost.org/trac/boost/ticket/6674 #6674] shared_mutex: try_lock_upgrade_until doesn't works.
@@ -179,8 +181,6 @@
# Complete the C++11 missing features, in particular
* [@http://svn.boost.org/trac/boost/ticket/4710 #4710] Missing async().
- * [@http://svn.boost.org/trac/boost/ticket/6342 #6342] Breaking change: Adapt the one_flag and call_once to the c++11 interface.
-
* [@http://svn.boost.org/trac/boost/ticket/6227 #6227] Use of variadic templates on Generic Locking Algorithms on compilers providing them.
* [@http://svn.boost.org/trac/boost/ticket/6270 #6270] Add thread constructor from movable callable and movable arguments following C++11.
Modified: trunk/libs/thread/doc/compliance.qbk
==============================================================================
--- trunk/libs/thread/doc/compliance.qbk (original)
+++ trunk/libs/thread/doc/compliance.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -91,7 +91,7 @@
[table Compliance with Howard's Shared Locking proposal
[[Section] [Description] [Status] [Comments]]
- [[X] [Shared Locking] [Yes] [Needs BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION]]
+ [[X] [Shared Locking] [Yes] [Needs `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION]]
[[X.1] [Shared Lockables Concepts] [Yes] [ - ]]
[[X.1.1] [SharedLockable concept] [Yes] [ - ]]
[[X.1.2] [UpgradeLockable concept] [Yes] [ - ]]
Modified: trunk/libs/thread/doc/condition_variables.qbk
==============================================================================
--- trunk/libs/thread/doc/condition_variables.qbk (original)
+++ trunk/libs/thread/doc/condition_variables.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -104,17 +104,6 @@
template<typename predicate_type>
void wait(boost::unique_lock<boost::mutex>& lock,predicate_type predicate);
- bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::system_time const& abs_time); // DEPRECATED V2
-
- template<typename duration_type>
- bool timed_wait(boost::unique_lock<boost::mutex>& lock,duration_type const& rel_time); // DEPRECATED V2
-
- template<typename predicate_type>
- bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::system_time const& abs_time,predicate_type predicate); // DEPRECATED V2
-
- template<typename duration_type,typename predicate_type>
- bool timed_wait(boost::unique_lock<boost::mutex>& lock,duration_type const& rel_time,predicate_type predicate); // DEPRECATED V2
-
template <class Clock, class Duration>
typename cv_status::type
wait_until(
@@ -141,12 +130,20 @@
const chrono::duration<Rep, Period>& d,
Predicate pred);
- // backwards compatibility
-
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::system_time const& abs_time); // DEPRECATED V2
+ template<typename duration_type>
+ bool timed_wait(boost::unique_lock<boost::mutex>& lock,duration_type const& rel_time); // DEPRECATED V2
+ template<typename predicate_type>
+ bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::system_time const& abs_time,predicate_type predicate); // DEPRECATED V2
+ template<typename duration_type,typename predicate_type>
+ bool timed_wait(boost::unique_lock<boost::mutex>& lock,duration_type const& rel_time,predicate_type predicate); // DEPRECATED V2
bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::xtime const& abs_time); // DEPRECATED V2
template<typename predicate_type>
bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::xtime const& abs_time,predicate_type predicate); // DEPRECATED V2
+ #endif
+
};
}
@@ -461,18 +458,6 @@
template<typename lock_type,typename predicate_type>
void wait(lock_type& lock,predicate_type predicate);
- template<typename lock_type>
- bool timed_wait(lock_type& lock,boost::system_time const& abs_time) // DEPRECATED V2;
-
- template<typename lock_type,typename duration_type>
- bool timed_wait(lock_type& lock,duration_type const& rel_time) // DEPRECATED V2;
-
- template<typename lock_type,typename predicate_type>
- bool timed_wait(lock_type& lock,boost::system_time const& abs_time,predicate_type predicate) // DEPRECATED V2;
-
- template<typename lock_type,typename duration_type,typename predicate_type>
- bool timed_wait(lock_type& lock,duration_type const& rel_time,predicate_type predicate) // DEPRECATED V2;
-
template <class lock_type, class Clock, class Duration>
cv_status wait_until(
lock_type& lock,
@@ -496,13 +481,20 @@
const chrono::duration<Rep, Period>& d,
Predicate pred);
- // backwards compatibility
-
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ template<typename lock_type>
+ bool timed_wait(lock_type& lock,boost::system_time const& abs_time) // DEPRECATED V2;
+ template<typename lock_type,typename duration_type>
+ bool timed_wait(lock_type& lock,duration_type const& rel_time) // DEPRECATED V2;
+ template<typename lock_type,typename predicate_type>
+ bool timed_wait(lock_type& lock,boost::system_time const& abs_time,predicate_type predicate) // DEPRECATED V2;
+ template<typename lock_type,typename duration_type,typename predicate_type>
+ bool timed_wait(lock_type& lock,duration_type const& rel_time,predicate_type predicate) // DEPRECATED V2;
template<typename lock_type>
bool timed_wait(lock_type>& lock,boost::xtime const& abs_time) // DEPRECATED V2;
-
template<typename lock_type,typename predicate_type>
bool timed_wait(lock_type& lock,boost::xtime const& abs_time,predicate_type predicate) // DEPRECATED V2;
+ #endif
};
}
Modified: trunk/libs/thread/doc/configuration.qbk
==============================================================================
--- trunk/libs/thread/doc/configuration.qbk (original)
+++ trunk/libs/thread/doc/configuration.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -12,7 +12,7 @@
Boost.Thread uses by default Boost.System to define the exceptions. For backward compatibility and also for compilers that don't work well with Boost.System the user can define `BOOST_THREAD_DONT_USE_SYSTEM `.
-`BOOST_THREAD_DONT_USE_MOVE` is defined when Boost.Thread uses Boost.Move.
+`BOOST_THREAD_USES_SYSTEM` is defined when Boost.Thread uses Boost.Move.
[endsect]
@@ -20,7 +20,7 @@
Boost.Thread uses by default Boost.Chrono for the time related functions. For backward compatibility and also for compilers that don't work well with Boost.Chrono the user can define `BOOST_THREAD_DONT_USE_CHRONO`. If `BOOST_THREAD_DONT_USE_SYSTEM` is defined then `BOOST_THREAD_DONT_USE_CHRONO` is defined implicitly.
-`BOOST_THREAD_USE_CHRONO` is defined when Boost.Thread uses Boost.Move.
+`BOOST_THREAD_USES_CHRONO` is defined when Boost.Thread uses Boost.Chrono.
[endsect]
@@ -28,42 +28,43 @@
Boost.Thread uses by default Boost.Move emulation on compilers that don't support Rvalue references. For backward compatibility and also for compilers that don't work well with Boost.Move the user can define `BOOST_THREAD_DONT_USE_MOVE`.
-`BOOST_THREAD_USE_MOVE` is defined when Boost.Thread uses Boost.Move.
+`BOOST_THREAD_USES_MOVE` is defined when Boost.Thread uses Boost.Move.
[endsect]
[section:shared_gen Shared Locking Generic]
-The shared mutex implementation on Windows platform provides currently less functionality than the generic one that is used for PTheads based platforms. In order to have access to these functions, the user needs to define `BOOST_THREAD_SHARED_MUTEX_GENERIC` to use the generic implementation, that while could be less efficient, provides all the functions.
+The shared mutex implementation on Windows platform provides currently less functionality than the generic one that is used for PTheads based platforms. In order to have access to these functions, the user needs to define `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` to use the generic implementation, that while could be less efficient, provides all the functions.
+
+Define `BOOST_THREAD_DONT_PROVIDE_GENERIC_SHARED_MUTEX_ON_WIN` if you don't want these functions.
[endsect]
[section:shared_upwards Shared Locking Upwards Conversion]
Boost.Threads includes in version 2 the Shared Locking Upwards Conversion as defined in [@http://home.roadrunner.com/~hinnant/bloomington/shared_mutex.html Shared Locking].
-These conversions need to be used carefully to avoid deadlock or livelock. The user need to define explicitly `BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION` to get these upwards conversions.
+These conversions need to be used carefully to avoid deadlock or livelock. The user need to define explicitly `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` to get these upwards conversions.
-[endsect]
+Define `BOOST_THREAD_DONT_PROVIDE_SHARED_MUTEX_UPWARDS_CONVERSION` if you don't want these functions.
-[section:explicit_cnv Explicit Lock Conversion]
-
-In [@http://home.roadrunner.com/~hinnant/bloomington/shared_mutex.html Shared Locking] the lock conversions are explicit. As this explicit conversion breaks the lock interfaces, it is provided only if the `BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION` is defined.
[endsect]
-[section:deprecated Deprecated]
-
-Version 2.0.0 deprecates some Boost.Thread features.
+[section:explicit_cnv Explicit Lock Conversion]
-These deprecated features will be provided by default up to boost 1.52. If you don't want to include the deprecated features you could define `BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0`. Since 1.53 these features will not be included any more by default. Since this version, if you want to include the deprecated features yet you could define `BOOST_THREAD_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0`. These deprecated features will be only available until boost 1.55, that is you have 1 year and a half to move to the new features.
+In [@http://home.roadrunner.com/~hinnant/bloomington/shared_mutex.html Shared Locking] the lock conversions are explicit. As this explicit conversion breaks the lock interfaces, it is provided only if the `BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION` is defined.
+Define `BOOST_THREAD_DONT_PROVIDE_EXPLICIT_LOCK_CONVERSION` if you don't want these functions.
[endsect]
+
[section:future unique_future versus future]
C++11 uses `std::future`. Versions of Boost.Thread previous to version 2.0.0 uses `boost:unique_future`.
-Since version 2.0.0 `boost::future` replaces `boost::__unique_future` when `BOOST_THREAD_USES_FUTURE` is defined. The documentation doesn't contains anymore however `boost::__unique_future`.
+Since version 2.0.0 `boost::future` replaces `boost::unique_future` when `BOOST_THREAD_PROVIDES_FUTURE` is defined. The documentation doesn't contains anymore however `boost::unique_future`.
+
+Define `BOOST_THREAD_DONT_PROVIDE_FUTURE ` if you don't want these functions.
[endsect]
@@ -71,7 +72,9 @@
C++11 promise initialize the associated state at construction time. Versions of Boost.Thread previous to version 2.0.0 initialize it lazily at any point in time in which this associated state is needed.
-Since version 2.0.0 this difference in behavior can be configured. When `BOOST_THREAD_PROMISE_LAZY` is defined the backward compatible behavior is provided.
+Since version 2.0.0 this difference in behavior can be configured. When `BOOST_THREAD_PROVIDES_PROMISE_LAZY` is defined the backward compatible behavior is provided.
+
+Define `BOOST_THREAD_DONT_PROVIDE_PROMISE_LAZY ` if you don't want this feature.
[endsect]
@@ -113,32 +116,90 @@
struct uses_allocator : public container::uses_allocator<T, Alloc> {};
}
-which introduces a dependency on Boost.Container. This feature is provided only if `BOOST_THREAD_FUTURE_USES_ALLOCATORS` is defined.
+which introduces a dependency on Boost.Container. This feature is provided only if `BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS` is defined.
+
+Define `BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS ` if you don't want this feature.
[endsect]
[section:terminate Call to terminate if joinable]
-C++11 has a different semantic for the thread destructor and the move assignment. Instead of detaching the thread, calls to terminate() if the thread was joinable. When `BOOST_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE` and `BOOST_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE` is defined Boost.Thread provides the C++ semantic.
+C++11 has a different semantic for the thread destructor and the move assignment. Instead of detaching the thread, calls to terminate() if the thread was joinable. When `BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE` and `BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE` is defined Boost.Thread provides the C++ semantic.
+
+Define `BOOST_THREAD_DONT_PROVIDE_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE` or `BOOST_THREAD_DONT_PROVIDE_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE` if you don't want these features.
+
+[endsect]
+
+[section:once_flag once_flag]
+
+C++11 defines a default constructor for once_flag. When `BOOST_THREAD_PROVIDES_ONCE_CXX11 ` is defined Boost.Thread provides this C++ semantics. In this case, the previous aggregate syntax is not supported.
+
+ boost::once_flag once = BOOST_ONCE_INIT;
+
+You should now just do
+
+ boost::once_flag once;
+
+Define `BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11 ` if you don't want this feature.
+
+[endsect]
+
+[section:deprecated Deprecated]
+
+Version 2.0.0 deprecates some Boost.Thread features.
+
+These deprecated features will be provided by default up to boost 1.52. If you don't want to include the deprecated features you could define `BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0`. Since 1.53 these features will not be included any more by default. Since this version, if you want to include the deprecated features yet you could define `BOOST_THREAD_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0`. These deprecated features will be only available until boost 1.55, that is you have 1 year and a half to move to the new features.
+
[endsect]
-[section:version `BOOST_THREAD_VERSION` Version]
+[section:version Version]
`BOOST_THREAD_VERSION` defines the Boost.Thread version.
-The default version is 1.
+The default version is 1. In this case the following breaking or extending macros are defined if the opposite is not requested:
+
+* `BOOST_THREAD_PROVIDES_PROMISE_LAZY`
+* `BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0`
-The user can request the version 2 by defining `BOOST_THREAD_VERSION` to 2. In this case the following breaking or extending macros are defined
+The user can request the version 2 by defining `BOOST_THREAD_VERSION` to 2. In this case the following breaking or extending macros are defined if the opposite is not requested:
* Breaking change `BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION `
-* Breaking change `BOOST_THREAD_USES_FUTURE`
-* Uniformity `BOOST_THREAD_SHARED_MUTEX_GENERIC`
-* Extension `BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION`
-* Conformity `BOOST_THREAD_FUTURE_USES_ALLOCATORS`
-* Breaking change BOOST_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
-* Breaking change BOOST_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+* Breaking change `BOOST_THREAD_PROVIDES_FUTURE`
+* Uniformity `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN`
+* Extension `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION`
+* Conformity `BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS`
+* Breaking change BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+* Breaking change BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+* Breaking change `BOOST_THREAD_PROVIDES_ONCE_CXX11`
+
+* Breaking change `BOOST_THREAD_DONT_PROVIDE_PROMISE_LAZY`
+* Breaking change `BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0`
[endsect]
-[endsect]
\ No newline at end of file
+[endsect]
+
+[section:limitations Limitations]
+
+Some compilers don't work correctly with some of the added features.
+
+[section:sun SunPro]
+
+If __SUNPRO_CC < 0x5100 the library defines
+
+* `BOOST_THREAD_DONT_USE_MOVE`
+* `BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS`
+
+
+[endsect]
+[section:vacpp VACPP]
+
+If __IBMCPP__ is defined the library defines
+
+* `BOOST_THREAD_DONT_USE_CHRONO`
+
+And Boost.Thread doesn't links with Boost.Chrono.
+
+[endsect]
+[endsect]
Modified: trunk/libs/thread/doc/future_ref.qbk
==============================================================================
--- trunk/libs/thread/doc/future_ref.qbk (original)
+++ trunk/libs/thread/doc/future_ref.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -11,10 +11,12 @@
namespace boost
{
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
namespace future_state // DEPRECATED V2
{
enum state {uninitialized, waiting, ready, moved};
}
+ #endif
enum class future_errc
{
@@ -167,8 +169,6 @@
unique_future(unique_future & rhs);// = delete;
unique_future& operator=(unique_future& rhs);// = delete;
- typedef future_state::state state; // DEPRECATED V2
-
unique_future() noexcept;
~unique_future();
@@ -183,7 +183,6 @@
R&& get();
// functions to check state
- state get_state() const; //DEPRECATED V2
bool valid() const;
bool is_ready() const; // EXTENSION
bool has_exception() const; // EXTENSION
@@ -196,10 +195,15 @@
template <class Clock, class Duration>
future_status wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
template<typename Duration>
bool timed_wait(Duration const& rel_time) const; // DEPRECATED V2
bool timed_wait_until(boost::system_time const& abs_time) const; // DEPRECATED V2
-
+ #endif
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+ typedef future_state::state state; // DEPRECATED V2
+ state get_state() const; //DEPRECATED V2
+ #endif
};
[section:default_constructor Default Constructor]
@@ -495,7 +499,6 @@
R get();
// functions to check state, and wait for ready
- state get_state() const noexcept; // DEPRECATED V2
bool valid() const noexcept;
bool is_ready() const noexcept; // EXTENSION
bool has_exception() const noexcept; // EXTENSION
@@ -508,9 +511,14 @@
template <class Clock, class Duration>
future_status wait_until(const chrono::time_point<Clock, Duration>& abs_time) const;
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
template<typename Duration>
bool timed_wait(Duration const& rel_time) const; // DEPRECATED V2
bool timed_wait_until(boost::system_time const& abs_time) const; // DEPRECATED V2
+ #endif
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+ state get_state() const noexcept; // DEPRECATED V2
+ #endif
};
[section:default_constructor Default Constructor]
Modified: trunk/libs/thread/doc/mutex_concepts.qbk
==============================================================================
--- trunk/libs/thread/doc/mutex_concepts.qbk (original)
+++ trunk/libs/thread/doc/mutex_concepts.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -367,7 +367,7 @@
* `m.__unlock_upgrade_and_lock_shared();`
-If BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION is defined the following expressions are also required:
+If `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION is defined the following expressions are also required:
* `m.__try_unlock_shared_and_lock();`
* `m.__try_unlock_shared_and_lock_for(rel_time);`
@@ -455,7 +455,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -478,7 +478,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -503,7 +503,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -529,7 +529,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -555,7 +555,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -595,7 +595,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -622,7 +622,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
@@ -648,7 +648,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -708,7 +708,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
@@ -735,7 +735,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -760,7 +760,7 @@
[[Throws:] [Nothing]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
[endsect]
@@ -916,7 +916,7 @@
unique_lock(Lockable& m_,defer_lock_t) noexcept;
unique_lock(Lockable& m_,try_to_lock_t);
- #ifdef BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+ #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION
unique_lock(shared_lock<mutex_type>&& sl, try_to_lock_t)
template <class Clock, class Duration>
unique_lock(shared_lock<mutex_type>&& sl,
@@ -926,7 +926,6 @@
const chrono::duration<Rep, Period>& rel_time)
#endif
- unique_lock(Lockable& m_,system_time const& target_time); // DEPRECATED V2
template <class Clock, class Duration>
unique_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t);
template <class Rep, class Period>
@@ -946,9 +945,6 @@
void lock();
bool try_lock();
- template<typename TimeDuration>
- bool timed_lock(TimeDuration const& relative_time); // DEPRECATED V2
- bool timed_lock(::boost::system_time const& absolute_time); // DEPRECATED V2
template <class Rep, class Period>
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
template <class Clock, class Duration>
@@ -960,6 +956,14 @@
bool owns_lock() const noexcept;
Lockable* mutex() const noexcept;
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ unique_lock(Lockable& m_,system_time const& target_time); // DEPRECATED V2
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const& relative_time); // DEPRECATED V2
+ bool timed_lock(::boost::system_time const& absolute_time); // DEPRECATED V2
+ #endif
+
};
__unique_lock__ is more complex than __lock_guard__: not only does it provide for RAII-style locking, it also allows for deferring
@@ -1070,7 +1074,7 @@
[[Throws:] [Nothing.]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
@@ -1095,7 +1099,7 @@
[[Throws:] [Nothing.]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
@@ -1122,7 +1126,7 @@
[[Throws:] [Nothing.]]
-[[Notes:] [Available only if BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION and BOOST_THREAD_SHARED_MUTEX_GENERIC is defined on Windows platform]]
+[[Notes:] [Available only if `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` and `BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN` is defined on Windows platform]]
]
@@ -1132,7 +1136,7 @@
-[section:constructor_abs_time `unique_lock(Lockable & m,boost::system_time const& abs_time)` // DEPRECATED V2]
+[section:constructor_abs_time `unique_lock(Lockable & m,boost::system_time const& abs_time)` DEPRECATED V2]
[variablelist
@@ -1277,7 +1281,6 @@
shared_lock(Lockable& m_,adopt_lock_t);
shared_lock(Lockable& m_,defer_lock_t);
shared_lock(Lockable& m_,try_to_lock_t);
- shared_lock(Lockable& m_,system_time const& target_time); // DEPRECATED V2
template <class Clock, class Duration>
shared_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t);
template <class Rep, class Period>
@@ -1292,7 +1295,6 @@
void lock();
bool try_lock();
- bool timed_lock(boost::system_time const& target_time); // DEPRECATED V2
template <class Rep, class Period>
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
template <class Clock, class Duration>
@@ -1313,6 +1315,11 @@
explicit operator bool() const;
bool owns_lock() const;
mutex_type mutex() const;
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ shared_lock(Lockable& m_,system_time const& target_time); // DEPRECATED V2
+ bool timed_lock(boost::system_time const& target_time); // DEPRECATED V2
+ #endif
};
Like __unique_lock__, __shared_lock__ models the __lockable_concept__, but rather than acquiring unique ownership of the supplied
@@ -1538,7 +1545,7 @@
bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
void unlock();
- #ifdef BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+ #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION
// Conversion from shared locking
upgrade_lock(shared_lock<mutex_type>&& sl, try_to_lock_t);
template <class Clock, class Duration>
Modified: trunk/libs/thread/doc/mutexes.qbk
==============================================================================
--- trunk/libs/thread/doc/mutexes.qbk (original)
+++ trunk/libs/thread/doc/mutexes.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -76,9 +76,6 @@
void lock();
void unlock();
bool try_lock();
- bool timed_lock(system_time const & abs_time); // DEPRECATED V2
- template<typename TimeDuration>
- bool timed_lock(TimeDuration const & relative_time); // DEPRECATED V2
template <class Rep, class Period>
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
@@ -91,6 +88,13 @@
typedef unique_lock<timed_mutex> scoped_timed_lock;
typedef unspecified-type scoped_try_lock;
typedef scoped_timed_lock scoped_lock;
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ bool timed_lock(system_time const & abs_time); // DEPRECATED V2
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const & relative_time); // DEPRECATED V2
+ #endif
+
};
__timed_mutex__ implements the __timed_lockable_concept__ to provide an exclusive-ownership mutex. At most one thread can own the
@@ -186,9 +190,6 @@
bool try_lock();
void unlock();
- bool timed_lock(system_time const & abs_time); // DEPRECATED V2
- template<typename TimeDuration>
- bool timed_lock(TimeDuration const & relative_time); // DEPRECATED V2
template <class Rep, class Period>
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
@@ -201,6 +202,13 @@
typedef unique_lock<recursive_timed_mutex> scoped_lock;
typedef unspecified-type scoped_try_lock;
typedef scoped_lock scoped_timed_lock;
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ bool timed_lock(system_time const & abs_time); // DEPRECATED V2
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const & relative_time); // DEPRECATED V2
+ #endif
+
};
__recursive_timed_mutex__ implements the __timed_lockable_concept__ to provide an exclusive-ownership recursive mutex. At most one
Modified: trunk/libs/thread/doc/once.qbk
==============================================================================
--- trunk/libs/thread/doc/once.qbk (original)
+++ trunk/libs/thread/doc/once.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -7,16 +7,37 @@
[section:once One-time Initialization]
+ #include <boost/thread/once.hpp>
+
+ namespace boost
+ {
+ struct once_flag;
+ template<typename Callable>
+ void call_once(once_flag& flag,Callable func);
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+ void call_once(void (*func)(),once_flag& flag); //DEPRECATED V2
+ #endif
+
+ }
+
`boost::call_once` provides a mechanism for ensuring that an initialization routine is run exactly once without data races or deadlocks.
[section:once_flag Typedef `once_flag`]
- #include <boost/thread/once.hpp>
-
+ #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+ struct once_flag
+ {
+ constexprr once_flag() noexcept;
+ once_flag(const once_flag&) = delete;
+ once_flag& operator=(const once_flag&) = delete;
+ };
+ #else
typedef platform-specific-type once_flag;
#define BOOST_ONCE_INIT platform-specific-initializer
+ #endif
-Objects of type `boost::once_flag` shall be initialized with `BOOST_ONCE_INIT`:
+Objects of type `boost::once_flag` shall be initialized with `BOOST_ONCE_INIT` if BOOST_THREAD_PROVIDES_ONCE_CXX11 is not defined
boost::once_flag f=BOOST_ONCE_INIT;
@@ -24,8 +45,6 @@
[section:call_once Non-member function `call_once`]
- #include <boost/thread/once.hpp>
-
template<typename Callable>
void call_once(once_flag& flag,Callable func);
@@ -56,7 +75,7 @@
]
- void call_once(void (*func)(),once_flag& flag);
+ void call_once(void (*func)(),once_flag& flag); //DEPRECATED V2
This second overload is provided for backwards compatibility. The effects of `call_once(func,flag)` shall be the same as those of
`call_once(flag,func)`.
Modified: trunk/libs/thread/doc/shared_mutex_ref.qbk
==============================================================================
--- trunk/libs/thread/doc/shared_mutex_ref.qbk (original)
+++ trunk/libs/thread/doc/shared_mutex_ref.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -24,7 +24,6 @@
bool try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time);
template <class Clock, class Duration>
bool try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time);
- bool timed_lock_shared(system_time const& timeout); // DEPRECATED V2
void unlock_shared();
void lock();
@@ -33,9 +32,10 @@
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
template <class Clock, class Duration>
bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
- bool timed_lock(system_time const& timeout); // DEPRECATED V2
void unlock();
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+ // use upgrade_mutex instead.
void lock_upgrade(); // DEPRECATED V2
void unlock_upgrade(); // DEPRECATED V2
@@ -43,6 +43,13 @@
void unlock_and_lock_upgrade(); // DEPRECATED V2
void unlock_and_lock_shared(); // DEPRECATED V2
void unlock_upgrade_and_lock_shared(); // DEPRECATED V2
+ #endif
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ bool timed_lock_shared(system_time const& timeout); // DEPRECATED V2
+ bool timed_lock(system_time const& timeout); // DEPRECATED V2
+ #endif
+
};
The class `boost::shared_mutex` provides an implementation of a multiple-reader / single-writer mutex. It implements the
@@ -92,31 +99,38 @@
// Shared <-> Exclusive
+ #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
bool try_unlock_shared_and_lock();
template <class Rep, class Period>
bool try_unlock_shared_and_lock_for(const chrono::duration<Rep, Period>& rel_time);
template <class Clock, class Duration>
bool try_unlock_shared_and_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
+ #endif
void unlock_and_lock_shared();
// Shared <-> Upgrade
+ #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
bool try_unlock_shared_and_lock_upgrade();
template <class Rep, class Period>
bool try_unlock_shared_and_lock_upgrade_for(const chrono::duration<Rep, Period>& rel_time);
template <class Clock, class Duration>
bool try_unlock_shared_and_lock_upgrade_until(const chrono::time_point<Clock, Duration>& abs_time);
+ #endif
void unlock_upgrade_and_lock_shared();
// Upgrade <-> Exclusive
- void unlock_upgrade_and_lock();
- bool try_unlock_upgrade_and_lock();
- template <class Rep, class Period>
- bool try_unlock_upgrade_and_lock_for(const chrono::duration<Rep, Period>& rel_time);
- template <class Clock, class Duration>
- bool try_unlock_upgrade_and_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
- void unlock_and_lock_upgrade();
+ void unlock_upgrade_and_lock();
+ #if defined(BOOST_THREAD_PLATFORM_PTHREAD)
+ || defined(BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN)
+ bool try_unlock_upgrade_and_lock();
+ template <class Rep, class Period>
+ bool try_unlock_upgrade_and_lock_for(const chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool try_unlock_upgrade_and_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
+ #endif
+ void unlock_and_lock_upgrade();
};
The class `boost::upgrade_mutex` provides an implementation of a multiple-reader / single-writer mutex. It implements the
Modified: trunk/libs/thread/doc/thread_ref.qbk
==============================================================================
--- trunk/libs/thread/doc/thread_ref.qbk (original)
+++ trunk/libs/thread/doc/thread_ref.qbk 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -21,8 +21,6 @@
{
thread::id get_id() noexcept;
template<typename TimeDuration>
- void sleep(TimeDuration const& rel_time); // DEPRECATED V2
- void sleep(system_time const& abs_time) // DEPRECATED V2
void yield() noexcept;
template <class Clock, class Duration>
void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
@@ -38,6 +36,10 @@
class disable_interruption; // EXTENSION
class restore_interruption; // EXTENSION
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+ void sleep(TimeDuration const& rel_time); // DEPRECATED V2
+ void sleep(system_time const& abs_time) // DEPRECATED V2
+ #endif
}
class thread_group; // EXTENSION
@@ -395,9 +397,6 @@
bool joinable() const noexcept;
void join();
- bool timed_join(const system_time& wait_until); // DEPRECATED V2
- template<typename TimeDuration>
- bool timed_join(TimeDuration const& rel_time); // DEPRECATED V2
template <class Rep, class Period>
bool try_join_for(const chrono::duration<Rep, Period>& rel_time); // EXTENSION
template <class Clock, class Duration>
@@ -413,11 +412,20 @@
void interrupt(); // EXTENSION
bool interruption_requested() const noexcept; // EXTENSION
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ bool timed_join(const system_time& wait_until); // DEPRECATED V2
+ template<typename TimeDuration>
+ bool timed_join(TimeDuration const& rel_time); // DEPRECATED V2
+ #endif
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
bool operator==(const thread& other) const; // DEPRECATED V2
bool operator!=(const thread& other) const; // DEPRECATED V2
static void yield(); // DEPRECATED V2
static void sleep(const system_time& xt); // DEPRECATED V2
+ #endif
};
@@ -1225,8 +1233,6 @@
namespace this_thread {
thread::id get_id() noexcept;
template<typename TimeDuration>
- void sleep(TimeDuration const& rel_time); // DEPRECATED V2
- void sleep(system_time const& abs_time) // DEPRECATED V2
void yield() noexcept;
template <class Clock, class Duration>
void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
@@ -1241,6 +1247,11 @@
bool interruption_enabled() noexcept; // EXTENSION
class disable_interruption; // EXTENSION
class restore_interruption; // EXTENSION
+
+ #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 || defined BOOST_THREAD_DONT_USE_CHRONO
+ void sleep(TimeDuration const& rel_time); // DEPRECATED V2
+ void sleep(system_time const& abs_time) // DEPRECATED V2
+ #endif
}
}
Modified: trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/dtor_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -23,13 +23,13 @@
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include <libs/thread/test/sync/futures/test_allocator.hpp>
#endif
int main()
{
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
BOOST_TEST(test_alloc_base::count == 0);
{
typedef int T;
Modified: trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/move_assign_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,7 +19,6 @@
// promise& operator=(promise&& rhs);
#define BOOST_THREAD_VERSION 2
-#define BOOST_THREAD_FUTURE_USES_ALLOCATORS
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
Modified: trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/future/move_ctor_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,7 +19,6 @@
// promise(promise&& rhs);
#define BOOST_THREAD_VERSION 2
-#define BOOST_THREAD_FUTURE_USES_ALLOCATORS
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
Modified: trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -22,7 +22,7 @@
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include <libs/thread/test/sync/futures/test_allocator.hpp>
int main()
Modified: trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/dtor_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -68,7 +68,7 @@
boost::future<T> f;
{
boost::promise<T> p;
- f = p.get_future();
+ f = BOOST_EXPLICIT_MOVE(p.get_future());
}
try
{
Modified: trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/get_future_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -36,7 +36,7 @@
boost::future<double> f = BOOST_EXPLICIT_MOVE(p.get_future());
try
{
- f = p.get_future();
+ f = BOOST_EXPLICIT_MOVE(p.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
Modified: trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/move_assign_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,11 +19,10 @@
// promise& operator=(promise&& rhs);
#define BOOST_THREAD_VERSION 2
-#define BOOST_THREAD_FUTURE_USES_ALLOCATORS
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include <libs/thread/test/sync/futures/test_allocator.hpp>
#endif
@@ -32,7 +31,7 @@
int main()
{
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
BOOST_TEST(test_alloc_base::count == 0);
{
boost::promise<int> p0(boost::allocator_arg, test_allocator<int>());
@@ -45,7 +44,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -67,7 +66,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -88,7 +87,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -108,7 +107,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -125,7 +124,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -141,7 +140,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
Modified: trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,11 +19,10 @@
// promise(promise&& rhs);
#define BOOST_THREAD_VERSION 2
-#define BOOST_THREAD_FUTURE_USES_ALLOCATORS
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include <libs/thread/test/sync/futures/test_allocator.hpp>
#endif
@@ -31,7 +30,7 @@
int main()
{
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
BOOST_TEST(test_alloc_base::count == 0);
{
boost::promise<int> p0(boost::allocator_arg, test_allocator<int>());
@@ -45,7 +44,7 @@
std::cout << __LINE__ << std::endl;
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -66,7 +65,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -85,7 +84,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -106,7 +105,7 @@
std::cout << __LINE__ << std::endl;
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -123,7 +122,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
@@ -138,7 +137,7 @@
BOOST_TEST(f.valid());
try
{
- f = p0.get_future();
+ f = BOOST_EXPLICIT_MOVE(p0.get_future());
BOOST_TEST(false);
}
catch (const boost::future_error& e)
Modified: trunk/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -24,7 +24,7 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/static_assert.hpp>
-#if defined BOOST_THREAD_FUTURE_USES_ALLOCATORS
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include <libs/thread/test/sync/futures/test_allocator.hpp>
int main()
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/duration_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,7 +19,7 @@
// template <class Rep, class Period>
// unique_lock(mutex_type& m, const chrono::duration<Rep, Period>& rel_time);
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_for_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -20,9 +20,9 @@
// unique_lock(shared_lock<mutex_type>&&,
// const chrono::duration<Rep, Period>&);
-#define BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_try_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_try_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_try_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -18,9 +18,9 @@
// unique_lock(shared_lock&& u, try_to_lock);
-#define BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_shared_lock_until_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -20,9 +20,9 @@
// unique_lock(shared_lock<mutex_type>&&,
// const chrono::time_point<Clock, Duration>&);
-#define BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_for_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -20,7 +20,7 @@
// unique_lock(shared_lock<mutex_type>&&,
// const chrono::duration<Rep, Period>&);
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_try_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_try_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_try_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -18,7 +18,7 @@
// unique_lock(upgrade_lock&& u, try_to_lock);
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/move_ctor_upgrade_lock_until_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -20,7 +20,7 @@
// unique_lock(shared_lock<mutex_type>&&,
// const chrono::time_point<Clock, Duration>&);
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,7 +19,7 @@
// template <class Clock, class Duration>
// unique_lock(mutex_type& m, const chrono::time_point<Clock, Duration>& abs_time);
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/duration_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/duration_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/duration_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,7 +19,7 @@
// template <class Rep, class Period>
// upgrade_lock(mutex_type& m, const chrono::duration<Rep, Period>& rel_time);
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_for_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_for_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -20,9 +20,9 @@
// upgrade_lock(shared_lock<mutex_type>&&,
// const chrono::duration<Rep, Period>&);
-#define BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_try_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_try_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_try_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -18,9 +18,9 @@
// upgrade_lock(shared_lock&& u, try_to_lock);
-#define BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_until_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/move_ctor_shared_lock_until_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -20,9 +20,9 @@
// upgrade_lock(shared_lock<mutex_type>&&,
// const chrono::time_point<Clock, Duration>&);
-#define BOOST_THREAD_SHARED_MUTEX_PROVIDES_UPWARDS_CONVERSION
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/time_point_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/time_point_pass.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/time_point_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -19,7 +19,7 @@
// template <class Clock, class Duration>
// upgrade_lock(mutex_type& m, const chrono::time_point<Clock, Duration>& abs_time);
-#define BOOST_THREAD_SHARED_MUTEX_GENERIC
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.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-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -7,7 +7,7 @@
int main() {
boost::packaged_task<int> pt(calculate_the_answer_to_life_the_universe_and_everything);
-boost::unique_future<int> fi=pt.get_future();
+boost::unique_future<int> fi=BOOST_EXPLICIT_MOVE(pt.get_future());
boost::thread task(boost::move(pt)); // launch task on a thread
Modified: trunk/libs/thread/test/threads/thread/assign/move_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/assign/move_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/assign/move_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -18,7 +18,7 @@
// thread& operator=(thread&& t);
-#define BOOST_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
#include <boost/thread/thread.hpp>
#include <new>
Modified: trunk/libs/thread/test/threads/thread/destr/dtor_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/thread/destr/dtor_pass.cpp (original)
+++ trunk/libs/thread/test/threads/thread/destr/dtor_pass.cpp 2012-04-05 18:39:22 EDT (Thu, 05 Apr 2012)
@@ -17,7 +17,7 @@
// ~thread();
-#define BOOST_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
#include <boost/thread/thread.hpp>
#include <new>
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