Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76297 - trunk/libs/thread/doc
From: vicente.botet_at_[hidden]
Date: 2012-01-03 16:45:32


Author: viboes
Date: 2012-01-03 16:45:31 EST (Tue, 03 Jan 2012)
New Revision: 76297
URL: http://svn.boost.org/trac/boost/changeset/76297

Log:
Thread: Added doc related to a lot of tickets mainly the time related #6195, noexcept #6224, exceptions #6230, cv_status #6273
Text files modified:
   trunk/libs/thread/doc/changes.qbk | 27 ++
   trunk/libs/thread/doc/compliance.qbk | 55 +++---
   trunk/libs/thread/doc/condition_variables.qbk | 209 +++++++++++++++++++++++--
   trunk/libs/thread/doc/mutex_concepts.qbk | 155 ++++++++++++++++--
   trunk/libs/thread/doc/mutexes.qbk | 20 +
   trunk/libs/thread/doc/thread_ref.qbk | 327 ++++++++++++++++++++++++++++++++++-----
   6 files changed, 664 insertions(+), 129 deletions(-)

Modified: trunk/libs/thread/doc/changes.qbk
==============================================================================
--- trunk/libs/thread/doc/changes.qbk (original)
+++ trunk/libs/thread/doc/changes.qbk 2012-01-03 16:45:31 EST (Tue, 03 Jan 2012)
@@ -1,5 +1,6 @@
 [/
   (C) Copyright 2007-8 Anthony Williams.
+ (C) Copyright 2011 Vicente J. Botet Escriba.
   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).
@@ -7,11 +8,22 @@
 
 [section:changes Changes since]
 
-[heading Changes since boost 1.41]
+[heading boost 1.49]
 
+
+New Features:
+
+* [@http://svn.boost.org/trac/boost/ticket/6195 #6195] c++11 compliance: Provide the standard time related interface using Boost.Chrono.
+* [@http://svn.boost.org/trac/boost/ticket/6224 #6224] c++11 compliance: Add the use of standard noexcept on compilers supporting them.
+* [@http://svn.boost.org/trac/boost/ticket/6226 #6226] c++11 compliance: Add explicit bool conversion from locks.
+* [@http://svn.boost.org/trac/boost/ticket/6230 #6230] c++11 compliance: Follows the exception reporting mechanism as defined in the c++11.
+* [@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.
+
 Fixed Bugs:
 
 * [@http://svn.boost.org/trac/boost/ticket/2309 #2309] Lack of g++ symbol visibility support in Boost.Thread.
+* [@http://svn.boost.org/trac/boost/ticket/2575 #2575] Bug- Boost 1.36.0 on Itanium platform.
 * [@http://svn.boost.org/trac/boost/ticket/2639 #2639] documentation should be extended(defer_lock, try_to_lock, ...).
 
 * [@http://svn.boost.org/trac/boost/ticket/3639 #3639] Boost.Thread doesn't build with Sun-5.9 on Linux.
@@ -23,22 +35,31 @@
 * [@http://svn.boost.org/trac/boost/ticket/4315 #4315] gcc 4.4 Warning: inline ... declared as dllimport: attribute ignored.
 * [@http://svn.boost.org/trac/boost/ticket/4480 #4480] OpenVMS patches for compiler issues workarounds.
 * [@http://svn.boost.org/trac/boost/ticket/4819 #4819] boost.thread's documentation misprints.
+* [@http://svn.boost.org/trac/boost/ticket/4921 #4921] BOOST_THREAD_USE_DLL and BOOST_THREAD_USE_LIB are crucial and need to be documented.
 
+* [@http://svn.boost.org/trac/boost/ticket/5013 #5013] documentation: boost::thread: pthreas_exit causes terminate().
+* [@http://svn.boost.org/trac/boost/ticket/5040 #5040] future.hpp in boost::thread does not compile with /clr.
+* [@http://svn.boost.org/trac/boost/ticket/5351 #5351] interrupt a future get boost::unknown_exception.
 * [@http://svn.boost.org/trac/boost/ticket/5423 #5423] thread issues with C++0x.
+* [@http://svn.boost.org/trac/boost/ticket/5502 #5502] race condition between shared_mutex timed_lock and lock_shared.
+* [@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/5594 #5594] boost::shared_mutex not fully compatible with Windows CE.
 * [@http://svn.boost.org/trac/boost/ticket/5617 #5617] boost::thread::id copy ctor.
 * [@http://svn.boost.org/trac/boost/ticket/5739 #5739] set-but-not-used warnings with gcc-4.6.
 * [@http://svn.boost.org/trac/boost/ticket/5826 #5826] threads.cpp: resource leak on threads creation failure.
 * [@http://svn.boost.org/trac/boost/ticket/5839 #5839] thread.cpp: ThreadProxy leaks on exceptions.
 * [@http://svn.boost.org/trac/boost/ticket/5859 #5859] win32 shared_mutex constructor leaks on exceptions.
+* [@http://svn.boost.org/trac/boost/ticket/5990 #5990] shared_future<T>::get() has wrong return type.
+
 
 * [@http://svn.boost.org/trac/boost/ticket/6100 #6100] Compute hardware_concurrency() using get_nprocs() on GLIBC systems.
+* [@http://svn.boost.org/trac/boost/ticket/6174 #6168] packaged_task doesn't correctly handle moving results.
 * [@http://svn.boost.org/trac/boost/ticket/6168 #6168] recursive_mutex is using wrong config symbol (possible typo).
 * [@http://svn.boost.org/trac/boost/ticket/6175 #6175] Compile error with SunStudio.
 * [@http://svn.boost.org/trac/boost/ticket/6200 #6200] patch to have condition_variable and mutex error better handle EINTR.
 * [@http://svn.boost.org/trac/boost/ticket/6207 #6207] shared_lock swap compiler error on clang 3.0 c++11.
 * [@http://svn.boost.org/trac/boost/ticket/6208 #6208] try_lock_wrapper swap compiler error on clang 3.0 c++11.
 
-
 [heading Changes since boost 1.40]
 
 The 1.41.0 release of Boost adds futures to the thread library. There are also a few minor changes.
@@ -126,8 +147,6 @@
 
 * [@http://svn.boost.org/trac/boost/ticket/6194 #6194] Adapt to Boost.Move.
 * [@http://svn.boost.org/trac/boost/ticket/4710 #4710] Missing async().
-* [@http://svn.boost.org/trac/boost/ticket/6195 #6195] Provide the standard time related interface using Boost.Chrono.
- * [@http://svn.boost.org/trac/boost/ticket/2637 #2637] shared mutex lock
 * Lock guards
   * [@http://svn.boost.org/trac/boost/ticket/1850 #1850] request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock
   * [@http://svn.boost.org/trac/boost/ticket/3567 #3567] Request for shared_lock_guard

Modified: trunk/libs/thread/doc/compliance.qbk
==============================================================================
--- trunk/libs/thread/doc/compliance.qbk (original)
+++ trunk/libs/thread/doc/compliance.qbk 2012-01-03 16:45:31 EST (Tue, 03 Jan 2012)
@@ -16,57 +16,58 @@
     [[30.1] [General] [-] [-] [-]]
     [[30.2] [Requirements] [-] [-] [-]]
     [[30.2.1] [Template parameter names] [-] [-] [-]]
- [[30.2.2] [Exceptions] [No] [-] [#12]]
+ [[30.2.2] [Exceptions] [No] [-] [#6230]]
     [[30.2.3] [Native handles] [Yes] [-] [-]]
     [[30.2.4] [Timing specifications] [No] [-] [#6195]]
     [[30.2.5] [Requirements for Lockable types] [Partial] [-] [-]]
     [[30.2.5.1] [In general] [-] [-] [-]]
- [[30.2.5.2] [BasicLockable requirements] [No] [-] [#13]]
+ [[30.2.5.2] [BasicLockable requirements] [No] [-] [#6231]]
     [[30.2.5.3] [Lockable requirements] [yes] [-] [-]]
     [[30.2.5.4] [TimedLockable requirements] [Partial] [chrono] [#6195]]
     [[30.2.6] [decay_copy] [-] [-] [-]]
     [[30.3] [Threads] [Partial] [-] [-]]
     [[30.3.1] [Class thread] [Partial] [-] [-]]
- [[30.3.1.1] [Class thread::id] [Partial] [Missing noexcept, template <> struct hash<thread::id>] [#3,#4]]
- [[30.3.1.2] [thread constructors] [Partial] [Missing noexcept and move semantics] [#3,#6194]]
- [[30.3.1.3] [thread destructor] [Yes] [-] [-]]
- [[30.3.1.4] [thread assignment] [Partial] [move semantics] [-]]
- [[30.3.1.5] [thread members] [Partial] [Missing noexcept, chrono] [#3,#6195]]
- [[30.3.1.6] [thread static members] [Partial] [Missing noexcept] [#3,#6195]]
+ [[30.3.1.1] [Class thread::id] [Partial] [Missing noexcept, template <> struct hash<thread::id>] [#6224,#6272]]
+ [[30.3.1.2] [thread constructors] [Partial] [Missing noexcept and move semantics] [#6224,#6194, #6270]]
+ [[30.3.1.3] [thread destructor] [Yes] [No] [#6266]]
+ [[30.3.1.4] [thread assignment] [Partial] [move semantics] [#6269]]
+ [[30.3.1.5] [thread members] [Partial] [Missing noexcept, chrono] [#6224,#6195]]
+ [[30.3.1.6] [thread static members] [Partial] [Missing noexcept] [#6224,#6195]]
     [[30.3.1.7] [thread specialized algorithms] [Yes] [-] [-]]
+
     [[30.3.2] [Namespace this_thread] [Partial] [chrono] [#6195]]
     [[30.4] [Mutual exclusion] [Partial] [-] [-]]
     [[30.4.1] [Mutex requirements] [Partial] [-] [-]]
     [[30.4.1.1] [In general] [Partial] [-] [-]]
- [[30.4.1.2] [Mutex types] [Partial] [noexcept,delete] [#3,#5]]
- [[30.4.1.2.1] [Class mutex] [Partial] [noexcept,delete] [#3,#5]]
- [[30.4.1.2.2] [Class recursive_mutex] [Partial] [noexcept,delete] [#3,#5]]
- [[30.4.1.3] [Timed mutex types] [Partial] [noexcept,chrono,delete] [#3,#6195,#5]]
- [[30.4.1.3.1] [Class timed_mutex] [Partial] [noexcept,chrono,delete] [#3,#6195,#5]]
- [[30.4.1.3.1] [Class recursive_timed_mutex] [Partial] [noexcept,chrono,delete] [#3,#6195,#5]]
- [[30.4.2] [Locks] [Partial] [noexcept,chrono,move,delete,bool] [#3,#6195,#5,#6]]
- [[30.4.2.1] [Class template lock_guard] [Partial] [cons/dest delete] [#5]]
- [[30.4.2.2] [Class template unique_lock] [Partial] [noexcept, chrono, move, delete] [#3,#6195,#5,#6]]
- [[30.4.2.2.1] [unique_lock constructors, destructor, and assignment] [Partial] [noexcept, chrono, move, delete] [#3,#6195,#5,#6]]
- [[30.4.2.2.2] [unique_lock locking] [Partial] [chrono] [,#6195,]]
+ [[30.4.1.2] [Mutex types] [Partial] [noexcept,delete] [#6224,#6225]]
+ [[30.4.1.2.1] [Class mutex] [Partial] [noexcept,delete] [#6224,#6225]]
+ [[30.4.1.2.2] [Class recursive_mutex] [Partial] [noexcept,delete] [#6224,#6225]]
+ [[30.4.1.3] [Timed mutex types] [Partial] [noexcept,chrono,delete] [#6224,#6195,#6225]]
+ [[30.4.1.3.1] [Class timed_mutex] [Partial] [noexcept,chrono,delete] [#6224,#6195,#6225]]
+ [[30.4.1.3.1] [Class recursive_timed_mutex] [Partial] [noexcept,chrono,delete] [#6224,#6195,#6225]]
+ [[30.4.2] [Locks] [Partial] [noexcept,chrono,move,delete,bool] [#6224,#6195,#6225,#6227]]
+ [[30.4.2.1] [Class template lock_guard] [Partial] [cons/dest delete] [#6225]]
+ [[30.4.2.2] [Class template unique_lock] [Partial] [noexcept, chrono, move, delete] [#6224,#6195,#6225,#6227]]
+ [[30.4.2.2.1] [unique_lock constructors, destructor, and assignment] [Partial] [noexcept, chrono, move, delete] [#6224,#6195,#6225,#6227]]
+ [[30.4.2.2.2] [unique_lock locking] [Partial] [chrono] [#6195]]
     [[30.4.2.2.3] [unique_lock modifiers] [Yes] [-] [-]]
- [[30.4.2.2.4] [unique_lock observers] [Partial] [explicit operator bool] [#6]]
- [[30.4.3] [Generic locking algorithms] [Partial] [Variadic,] [#7]]
+ [[30.4.2.2.4] [unique_lock observers] [Partial] [explicit operator bool] [#6227]]
+ [[30.4.3] [Generic locking algorithms] [Partial] [variadic] [#6227]]
     [[30.4.4] [Call once] [Partial] [move,variadic] [#6194,#7]]
     [[30.4.4.1] [Struct once_flag] [Yes] [-] [-]]
     [[30.4.4.2] [Function call_once] [Yes] [-] [-]]
- [[30.5] [Condition variables] [Partial] [chrono,cv_status,notify_all_at_thread_exit] [#6195,#8,#9]]
+ [[30.5] [Condition variables] [Partial] [chrono,cv_status,notify_all_at_thread_exit] [#6195,#6273,#9]]
     [[30.5 6-10] [Function notify_all_at_thread_exit] [No] [-] [#9]]
- [[30.5.1] [Class condition_variable] [Partial] [chrono,cv_status] [#6195,#8]]
- [[30.5.2] [Class condition_variable_any] [Partial] [chrono,cv_status] [#6195,#8]]
+ [[30.5.1] [Class condition_variable] [Partial] [chrono,cv_status] [#6195,#6273]]
+ [[30.5.2] [Class condition_variable_any] [Partial] [chrono,cv_status] [#6195,#6273]]
     [[30.6] [Futures] [Partial] [-] [-]]
     [[30.6.1] [Overview] [Partial] [-] [-]]
     [[30.6.2] [Error handling] [No] [-] [-]]
     [[30.6.3] [Class future_error] [No] [-] [-]]
     [[30.6.4] [Shared state] [No] [-] [-]]
- [[30.6.5] [Class template promise] [Partial] [allocator,move,delete] [#10,#6194,#5]]
- [[30.6.6] [Class template future] [No] [unique_future is the closest to future] [#11]]
- [[30.6.7] [Class template shared_future] [Partial] [allocator,move,delete] [#10,#6194,#5]]
+ [[30.6.5] [Class template promise] [Partial] [allocator,move,delete] [#6228,#6194,#6225]]
+ [[30.6.6] [Class template future] [No] [unique_future is the closest to future] [##6229,#6228]]
+ [[30.6.7] [Class template shared_future] [Partial] [allocator,move,delete] [#6228,#6194,#6225]]
     [[30.6.8] [Function template async] [No] [async] [#4710]]
     [[30.6.8] [Class template packaged_task] [Partial] [-] [-]]
 ]

Modified: trunk/libs/thread/doc/condition_variables.qbk
==============================================================================
--- trunk/libs/thread/doc/condition_variables.qbk (original)
+++ trunk/libs/thread/doc/condition_variables.qbk 2012-01-03 16:45:31 EST (Tue, 03 Jan 2012)
@@ -1,5 +1,6 @@
 [/
   (C) Copyright 2007-8 Anthony Williams.
+ (C) Copyright 2011 Vicente J. Botet Escriba.
   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).
@@ -9,6 +10,17 @@
 
 [heading Synopsis]
 
+ namespace boost
+ {
+ enum class cv_status;
+ {
+ no_timeout,
+ timeout
+ };
+ class condition_variable;
+ class condition_variable_any;
+ }
+
 The classes `condition_variable` and `condition_variable_any` provide a
 mechanism for one thread to wait for notification from another thread that a
 particular condition has become true. The general usage pattern is that one
@@ -84,31 +96,57 @@
             condition_variable();
             ~condition_variable();
 
- void notify_one();
- void notify_all();
+ void notify_one() noexcept;
+ void notify_all() noexcept;
 
             void wait(boost::unique_lock<boost::mutex>& lock);
 
             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);
+ 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);
+ 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);
+ 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);
+ 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(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<Clock, Duration>& t);
+
+ template <class Clock, class Duration, class Predicate>
+ bool
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<Clock, Duration>& t,
+ Predicate pred);
+
+ template <class Rep, class Period>
+ typename cv_status::type
+ wait_for(
+ unique_lock<mutex>& lock,
+ const chrono::duration<Rep, Period>& d);
+
+ template <class Rep, class Period, class Predicate>
+ bool
+ wait_for(
+ unique_lock<mutex>& lock,
+ const chrono::duration<Rep, Period>& d,
+ Predicate pred);
 
         // backwards compatibility
 
- bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::xtime const& abs_time);
+ 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);
+ bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::xtime const& abs_time,predicate_type predicate); // DEPRECATED V2
         };
     }
 
@@ -208,7 +246,7 @@
 
 [endsect]
 
-[section:timed_wait `bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::system_time const& abs_time)`]
+[section:timed_wait `bool timed_wait(boost::unique_lock<boost::mutex>& lock,boost::system_time const& abs_time)` DEPRECATED V2]
 
 [variablelist
 
@@ -239,7 +277,7 @@
 
 [endsect]
 
-[section:timed_wait_rel `template<typename duration_type> bool timed_wait(boost::unique_lock<boost::mutex>& lock,duration_type const& rel_time)`]
+[section:timed_wait_rel `template<typename duration_type> bool timed_wait(boost::unique_lock<boost::mutex>& lock,duration_type const& rel_time)` DEPRECATED V2]
 
 [variablelist
 
@@ -272,7 +310,7 @@
 
 [endsect]
 
-[section:timed_wait_predicate `template<typename predicate_type> bool timed_wait(boost::unique_lock<boost::mutex>& lock, boost::system_time const& abs_time, predicate_type pred)`]
+[section:timed_wait_predicate `template<typename predicate_type> bool timed_wait(boost::unique_lock<boost::mutex>& lock, boost::system_time const& abs_time, predicate_type pred)` DEPRECATED V2]
 
 [variablelist
 
@@ -292,6 +330,114 @@
 [endsect]
 
 
+[section:wait_until `template <class Clock, class Duration> cv_status wait_until(boost::unique_lock<boost::mutex>& lock, const chrono::time_point<Clock, Duration>& abs_time)`]
+
+[variablelist
+
+[[Precondition:] [`lock` is locked by the current thread, and either no other
+thread is currently waiting on `*this`, or the execution of the `mutex()` member
+function on the `lock` objects supplied in the calls to `wait` or `wait_for` or `wait_until`
+in all the threads currently waiting on `*this` would return the same value as
+`lock->mutex()` for this call to `wait`.]]
+
+[[Effects:] [Atomically call `lock.unlock()` and blocks the current thread. The
+thread will unblock when notified by a call to `this->notify_one()` or
+`this->notify_all()`, when the time as reported by `Clock::now()`
+would be equal to or later than the specified `abs_time`, or spuriously. When
+the thread is unblocked (for whatever reason), the lock is reacquired by
+invoking `lock.lock()` before the call to `wait` returns. The lock is also
+reacquired by invoking `lock.lock()` if the function exits with an exception.]]
+
+[[Returns:] [`cv_status::no_timeout` if the call is returning because the time specified by
+`abs_time` was reached, `cv_status::timeout` otherwise.]]
+
+[[Postcondition:] [`lock` is locked by the current thread.]]
+
+[[Throws:] [__thread_resource_error__ if an error
+occurs. __thread_interrupted__ if the wait was interrupted by a call to
+__interrupt__ on the __thread__ object associated with the current thread of execution.]]
+
+]
+
+[endsect]
+
+[section:wait_for `template <class Rep, class Period> cv_status wait_for(boost::unique_lock<boost::mutex>& lock, const chrono::duration<Rep, Period>& rel_time)`]
+
+
+[variablelist
+
+[[Precondition:] [`lock` is locked by the current thread, and either no other
+thread is currently waiting on `*this`, or the execution of the `mutex()` member
+function on the `lock` objects supplied in the calls to `wait` or `wait_until` or `wait_for`
+in all the threads currently waiting on `*this` would return the same value as
+`lock->mutex()` for this call to `wait`.]]
+
+[[Effects:] [Atomically call `lock.unlock()` and blocks the current thread. The
+thread will unblock when notified by a call to `this->notify_one()` or
+`this->notify_all()`, after the period of time indicated by the `rel_time`
+argument has elapsed, or spuriously. When the thread is unblocked (for whatever
+reason), the lock is reacquired by invoking `lock.lock()` before the call to
+`wait` returns. The lock is also reacquired by invoking `lock.lock()` if the
+function exits with an exception.]]
+
+[[Returns:] [`cv_status::no_timeout ` if the call is returning because the time period specified
+by `rel_time` has elapsed, `cv_status::timeout ` otherwise.]]
+
+[[Postcondition:] [`lock` is locked by the current thread.]]
+
+[[Throws:] [__thread_resource_error__ if an error
+occurs. __thread_interrupted__ if the wait was interrupted by a call to
+__interrupt__ on the __thread__ object associated with the current thread of execution.]]
+
+]
+
+[note The duration overload of timed_wait is difficult to use correctly. The overload taking a predicate should be preferred in most cases.]
+
+[endsect]
+
+[section:wait_until_predicate `template <class Clock, class Duration, class Predicate> bool wait_until(boost::unique_lock<boost::mutex>& lock, const chrono::time_point<Clock, Duration>& abs_time, Predicate pred)`]
+
+
+[variablelist
+
+[[Effects:] [As-if ``
+while(!pred())
+{
+ if(!wait_until(lock,abs_time))
+ {
+ return pred();
+ }
+}
+return true;
+``]]
+
+]
+
+[endsect]
+
+[section:wait_for_predicate `template <class Rep, class Period, class Predicate> bool wait_for(boost::unique_lock<boost::mutex>& lock, const chrono::duration<Rep, Period>& rel_time, Predicate pred)`]
+
+
+[variablelist
+
+[[Effects:] [As-if ``
+while(!pred())
+{
+ if(!wait_for(lock,rel_time))
+ {
+ return pred();
+ }
+}
+return true;
+``]]
+
+]
+
+[endsect]
+
+
+
+
 [endsect]
 
 [section:condition_variable_any Class `condition_variable_any`]
@@ -316,24 +462,47 @@
             void wait(lock_type& lock,predicate_type predicate);
 
             template<typename lock_type>
- bool timed_wait(lock_type& lock,boost::system_time const& abs_time);
+ 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);
+ 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);
+ 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);
+ 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,
+ const chrono::time_point<Clock, Duration>& t);
+
+ template <class lock_type, class Clock, class Duration, class Predicate>
+ bool wait_until(
+ lock_type& lock,
+ const chrono::time_point<Clock, Duration>& t,
+ Predicate pred);
+
+
+ template <class lock_type, class Rep, class Period>
+ cv_status wait_for(
+ lock_type& lock,
+ const chrono::duration<Rep, Period>& d);
+
+ template <class lock_type, class Rep, class Period, class Predicate>
+ bool wait_for(
+ lock_type& lock,
+ const chrono::duration<Rep, Period>& d,
+ Predicate pred);
 
         // backwards compatibility
 
             template<typename lock_type>
- bool timed_wait(lock_type>& lock,boost::xtime const& abs_time);
+ 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);
+ bool timed_wait(lock_type& lock,boost::xtime const& abs_time,predicate_type predicate) // DEPRECATED V2;
         };
     }
 
@@ -427,7 +596,7 @@
 
 [endsect]
 
-[section:timed_wait `template<typename lock_type> bool timed_wait(lock_type& lock,boost::system_time const& abs_time)`]
+[section:timed_wait `template<typename lock_type> bool timed_wait(lock_type& lock,boost::system_time const& abs_time)` DEPRECATED V2]
 
 [variablelist
 
@@ -452,7 +621,7 @@
 
 [endsect]
 
-[section:timed_wait_rel `template<typename lock_type,typename duration_type> bool timed_wait(lock_type& lock,duration_type const& rel_time)`]
+[section:timed_wait_rel `template<typename lock_type,typename duration_type> bool timed_wait(lock_type& lock,duration_type const& rel_time)` DEPRECATED V2]
 
 [variablelist
 
@@ -479,7 +648,7 @@
 
 [endsect]
 
-[section:timed_wait_predicate `template<typename lock_type,typename predicate_type> bool timed_wait(lock_type& lock, boost::system_time const& abs_time, predicate_type pred)`]
+[section:timed_wait_predicate `template<typename lock_type,typename predicate_type> bool timed_wait(lock_type& lock, boost::system_time const& abs_time, predicate_type pred)` DEPRECATED V2]
 
 [variablelist
 

Modified: trunk/libs/thread/doc/mutex_concepts.qbk
==============================================================================
--- trunk/libs/thread/doc/mutex_concepts.qbk (original)
+++ trunk/libs/thread/doc/mutex_concepts.qbk 2012-01-03 16:45:31 EST (Tue, 03 Jan 2012)
@@ -38,6 +38,16 @@
 
 [[Throws:] [__thread_resource_error__ if an error occurs.]]
 
+[[Error Conditions:] [
+
+[*operation_not_permitted]: if the thread does not have the privilege to perform the operation.
+
+[*resource_deadlock_would_occur]: if the implementation detects that a deadlock would occur.
+
+[*device_or_resource_busy]: if the mutex is already locked and blocking is not possible.
+
+]]
+
 ]
 [endsect]
 
@@ -51,7 +61,7 @@
 
 [[Postcondition:] [If the call returns `true`, the current thread owns the `*this`.]]
 
-[[Throws:] [__thread_resource_error__ if an error occurs.]]
+[[Throws:] [Nothing.]]
 
 ]
 [endsect]
@@ -66,7 +76,7 @@
 
 [[Postcondition:] [The current thread no longer owns `*this`.]]
 
-[[Throws:] [Nothing]]
+[[Throws:] [Nothing.]]
 ]
 [endsect]
 [endsect]
@@ -80,12 +90,17 @@
 of the __lockable_concept__. In addition, the following member functions must be
 provided:
 
-* [timed_lock_ref_link `bool timed_lock(boost::system_time const& abs_time);`]
-* [timed_lock_duration_ref_link `template<typename DurationType> bool timed_lock(DurationType const& rel_time);`]
+* [timed_lock_ref_link `bool timed_lock(boost::system_time const& abs_time);` DEPRECATED V2]
+* [timed_lock_duration_ref_link `template<typename DurationType> bool timed_lock(DurationType const& rel_time);` DEPRECATED V2]
+
+ template <class Rep, class Period>
+ 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>& t);
 
-Lock ownership acquired through a call to __timed_lock_ref__ must be released through a call to __unlock_ref__.
+Lock ownership acquired through a call to __timed_lock_ref__, __try_lock_for or __try_lock_until must be released through a call to __unlock_ref__.
 
-[section:timed_lock `bool timed_lock(boost::system_time const& abs_time)`]
+[section:timed_lock `bool timed_lock(boost::system_time const& abs_time)` DEPRECATED V2]
 
 [variablelist
 
@@ -101,7 +116,7 @@
 [endsect]
 
 [section:timed_lock_duration `template<typename DurationType> bool
-timed_lock(DurationType const& rel_time)`]
+timed_lock(DurationType const& rel_time)` DEPRECATED V2]
 
 [variablelist
 
@@ -111,6 +126,32 @@
 ]
 [endsect]
 
+[section:try_lock_until `template <class Clock, class Duration> bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)`]
+
+[variablelist
+
+[[Effects:] [Attempt to obtain ownership for the current thread. Blocks until ownership can be obtained, or the specified time is
+reached. If the specified time has already passed, behaves as __try_lock_ref__.]]
+
+[[Returns:] [`true` if ownership was obtained for the current thread, `false` otherwise.]]
+
+[[Postcondition:] [If the call returns `true`, the current thread owns `*this`.]]
+
+[[Throws:] [Nothing.]]
+]
+[endsect]
+
+[section:try_lock_for `template <class Rep, class Period> bool
+try_lock_for(const chrono::duration<Rep, Period>& rel_time)`]
+
+[variablelist
+
+[[Effects:] [As-if `__try_lock_until(chrono::steady_clock::now() + rel_time)`.]]
+
+]
+[endsect]
+
+
 [endsect]
 
 [section:shared_lockable `SharedLockable` Concept]
@@ -403,41 +444,54 @@
     class unique_lock
     {
     public:
- unique_lock();
+ unique_lock() noexcept;
         explicit unique_lock(Lockable& m_);
         unique_lock(Lockable& m_,adopt_lock_t);
- unique_lock(Lockable& m_,defer_lock_t);
+ unique_lock(Lockable& m_,defer_lock_t) noexcept;
         unique_lock(Lockable& m_,try_to_lock_t);
- unique_lock(Lockable& m_,system_time const& target_time);
+ 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>
+ unique_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d);
         ~unique_lock();
 
- unique_lock(detail::thread_move_t<unique_lock<Lockable> > other);
- unique_lock(detail::thread_move_t<upgrade_lock<Lockable> > other);
+ unique_lock(unique_lock<Lockable>&& other) noexcept;
+ unique_lock(detail::thread_move_t<unique_lock<Lockable> > other) noexcept;
+ unique_lock(upgrade_lock<Lockable>&& other) noexcept;
+ unique_lock(detail::thread_move_t<upgrade_lock<Lockable> > other) noexcept;
 
         operator detail::thread_move_t<unique_lock<Lockable> >();
         detail::thread_move_t<unique_lock<Lockable> > move();
- unique_lock& operator=(detail::thread_move_t<unique_lock<Lockable> > other);
- unique_lock& operator=(detail::thread_move_t<upgrade_lock<Lockable> > other);
+ unique_lock& operator=(unique_lock<Lockable>&& other) noexcept;
+ unique_lock& operator=(detail::thread_move_t<unique_lock<Lockable> > other) noexcept;
+ unique_lock& operator=(upgrade_lock<Lockable>&& other) noexcept;
+ unique_lock& operator=(detail::thread_move_t<upgrade_lock<Lockable> > other) noexcept;
 
- void swap(unique_lock& other);
- void swap(detail::thread_move_t<unique_lock<Lockable> > other);
+ void swap(unique_lock& other) noexcept;
+ void swap(detail::thread_move_t<unique_lock<Lockable> > other) noexcept;
 
         void lock();
         bool try_lock();
 
         template<typename TimeDuration>
- bool timed_lock(TimeDuration const& relative_time);
- bool timed_lock(::boost::system_time const& absolute_time);
+ 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>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
 
         void unlock();
 
- bool owns_lock() const;
- operator ``['unspecified-bool-type]``() const;
- bool operator!() const;
+ bool owns_lock() const noexcept;
+ explicit operator bool() const noexcept;
+ operator ``['unspecified-bool-type]``() const noexcept;
+ bool operator!() const noexcept;
 
- Lockable* mutex() const;
- Lockable* release();
+ Lockable* mutex() const noexcept;
+ Lockable* release() noexcept;
     };
 
 __unique_lock__ is more complex than __lock_guard__: not only does it provide for RAII-style locking, it also allows for deferring
@@ -533,7 +587,7 @@
 
 [endsect]
 
-[section:constructor_abs_time `unique_lock(Lockable & m,boost::system_time const& abs_time)`]
+[section:constructor_abs_time `unique_lock(Lockable & m,boost::system_time const& abs_time)` // DEPRECATED V2]
 
 [variablelist
 
@@ -551,6 +605,47 @@
 
 [endsect]
 
+[section:constructor_time_point `template <class Clock, class Duration> unique_lock(Lockable & m,const chrono::time_point<Clock, Duration>& abs_time)`]
+
+ template <class Rep, class Period>
+ unique_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d);
+
+
+[variablelist
+
+[[Effects:] [Stores a reference to `m`. Invokes
+`m.__try_lock_until(abs_time)`, and takes ownership of the lock state if the call
+returns `true`.]]
+
+[[Postcondition:] [__mutex_func_ref__ returns `&m`. If the call to __try_lock_until
+returned `true`, then __owns_lock_ref__ returns `true`, otherwise __owns_lock_ref__
+returns `false`.]]
+
+[[Throws:] [Any exceptions thrown by the call to `m.__try_lock_until(abs_time)`.]]
+
+]
+
+[endsect]
+
+[section:constructor_duration `template <class Rep, class Period> unique_lock(Lockable & m,const chrono::duration<Rep, Period>& abs_time)`]
+
+
+[variablelist
+
+[[Effects:] [Stores a reference to `m`. Invokes
+`m.__try_lock_for(rel_time)`, and takes ownership of the lock state if the call
+returns `true`.]]
+
+[[Postcondition:] [__mutex_func_ref__ returns `&m`. If the call to __try_lock_for
+returned `true`, then __owns_lock_ref__ returns `true`, otherwise __owns_lock_ref__
+returns `false`.]]
+
+[[Throws:] [Any exceptions thrown by the call to `m.__try_lock_for(rel_time)`.]]
+
+]
+
+[endsect]
+
 [section:destructor `~unique_lock()`]
 
 [variablelist
@@ -604,6 +699,18 @@
 
 [endsect]
 
+[section:explicit_bool_conversion `explicit operator bool() const`]
+
+[variablelist
+
+[[Returns:] [`__owns_lock_ref__()`.]]
+
+[[Throws:] [Nothing.]]
+
+]
+
+[endsect]
+
 [section:operator_not `bool operator!() const`]
 
 [variablelist

Modified: trunk/libs/thread/doc/mutexes.qbk
==============================================================================
--- trunk/libs/thread/doc/mutexes.qbk (original)
+++ trunk/libs/thread/doc/mutexes.qbk 2012-01-03 16:45:31 EST (Tue, 03 Jan 2012)
@@ -75,10 +75,14 @@
         void lock();
         void unlock();
         bool try_lock();
- bool timed_lock(system_time const & abs_time);
-
+ bool timed_lock(system_time const & abs_time); // DEPRECATED V2
         template<typename TimeDuration>
- bool timed_lock(TimeDuration const & relative_time);
+ 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);
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& t);
 
         typedef platform-specific-type native_handle_type;
         native_handle_type native_handle();
@@ -181,10 +185,14 @@
         bool try_lock();
         void unlock();
 
- bool timed_lock(system_time const & abs_time);
-
+ bool timed_lock(system_time const & abs_time); // DEPRECATED V2
         template<typename TimeDuration>
- bool timed_lock(TimeDuration const & relative_time);
+ 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);
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& t);
 
         typedef platform-specific-type native_handle_type;
         native_handle_type native_handle();

Modified: trunk/libs/thread/doc/thread_ref.qbk
==============================================================================
--- trunk/libs/thread/doc/thread_ref.qbk (original)
+++ trunk/libs/thread/doc/thread_ref.qbk 2012-01-03 16:45:31 EST (Tue, 03 Jan 2012)
@@ -1,5 +1,6 @@
 [/
   (C) Copyright 2007-8 Anthony Williams.
+ (C) Copyright 2011 Vicente J. Botet Escriba.
   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).
@@ -9,6 +10,30 @@
 
 [heading Synopsis]
 
+ namespace boost
+ {
+ class thread;
+ void swap(thread& lhs,thread& rhs);
+ namespace this_thread
+ {
+ thread::id get_id() noexcept;
+ template<typename TimeDuration>
+ void sleep(TimeDuration const& rel_time); // DEPRECATED
+ void sleep(system_time const& abs_time) // DEPRECATED
+ void yield() noexcept;
+ template <class Clock, class Duration>
+ void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
+
+ void interruption_point();
+ bool interruption_requested();
+ bool interruption_enabled();
+ class disable_interruption;
+ class restore_interruption;
+ }
+ }
+
 The __thread__ class is responsible for launching and managing threads. Each __thread__ object represents a single thread of execution,
 or __not_a_thread__, and at most one __thread__ object represents a given thread of execution: objects of type __thread__ are not
 copyable.
@@ -142,13 +167,20 @@
 current thread, and interruption is requested for the current thread:
 
 * [join_link `boost::thread::join()`]
-* [timed_join_link `boost::thread::timed_join()`]
+* [timed_join_link `boost::thread::timed_join()` DEPRECATED V2]
+* `thread::__try_join_for()`,
+* `thread::__try_join_until()`,
 * [cond_wait_link `boost::condition_variable::wait()`]
-* [cond_timed_wait_link `boost::condition_variable::timed_wait()`]
+* [cond_timed_wait_link `boost::condition_variable::timed_wait()` DEPRECATED V2]
+* `__condition_variable::__wait_for()`
+* `__condition_variable::__wait_until()`
 * [cond_any_wait_link `boost::condition_variable_any::wait()`]
-* [cond_any_timed_wait_link `boost::condition_variable_any::timed_wait()`]
-* [link thread.thread_management.thread.sleep `boost::thread::sleep()`]
-* __sleep__
+* [cond_any_timed_wait_link `boost::condition_variable_any::timed_wait()` DEPRECATED V2]
+* `__condition_variable_any::__wait_for()`
+* `__condition_variable_any::__wait_until()`
+* [link thread.thread_management.thread.sleep `boost::thread::sleep()` DEPRECATED V2]
+* `this_thread::__sleep_for()`
+* `this_thread::__sleep_until()`
 * __interruption_point__
 
 [heading Thread IDs]
@@ -185,12 +217,12 @@
 
 The first example of a native thread of execution is the main thread.
 
-The user can access to some synchronization functions related to the native current thread using the `boost::this_thread` `yield`, `sleep`, functions.
+The user can access to some synchronization functions related to the native current thread using the `boost::this_thread` `yield`, `sleep`, __sleep_for, __sleep_until, functions.
 
 
   int main() {
     // ...
- boost::this_thread::sleep();
+ boost::this_thread::sleep_for(boost::chrono::milliseconds(10));
     // ...
   }
 
@@ -214,7 +246,12 @@
     class thread
     {
     public:
- thread();
+ thread() noexcept;
+ thread(const thread&) = delete;
+ thread& operator=(const thread&) = delete;
+
+ thread(thread&&) noexcept;
+ thread& operator=(thread&&) noexcept;
         ~thread();
 
         template <class F>
@@ -226,27 +263,32 @@
         template <class F>
         thread(detail::thread_move_t<F> f);
 
+ template <class F, class ...Args> explicit thread(F&& f, Args&&... args);
+
         // move support
         thread(detail::thread_move_t<thread> x);
         thread& operator=(detail::thread_move_t<thread> x);
         operator detail::thread_move_t<thread>();
         detail::thread_move_t<thread> move();
 
- void swap(thread& x);
+ void swap(thread& x) noexcept;
 
         class id;
- id get_id() const;
+ id get_id() const noexcept;
 
- bool joinable() const;
+ bool joinable() const noexcept;
         void join();
- bool timed_join(const system_time& wait_until);
-
+ bool timed_join(const system_time& wait_until); // DEPRECATED V2
         template<typename TimeDuration>
- bool timed_join(TimeDuration const& rel_time);
+ 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);
+ template <class Clock, class Duration>
+ bool try_join_until(const chrono::time_point<Clock, Duration>& t);
 
         void detach();
 
- static unsigned hardware_concurrency();
+ static unsigned hardware_concurrency() noexcept;
 
         typedef platform-specific-type native_handle_type;
         native_handle_type native_handle();
@@ -255,19 +297,20 @@
         bool interruption_requested() const;
 
         // backwards compatibility
- bool operator==(const thread& other) const;
- bool operator!=(const thread& other) const;
+ 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
 
- static void yield();
- static void sleep(const system_time& xt);
     };
 
- void swap(thread& lhs,thread& rhs);
+ void swap(thread& lhs,thread& rhs) noexcep;
     detail::thread_move_t<thread> move(detail::thread_move_t<thread> t);
 
 [section:default_constructor Default Constructor]
 
- thread();
+ thread() noexcep;
 
 [variablelist
 
@@ -281,6 +324,7 @@
 
 [section:move_constructor Move Constructor]
 
+ thread(thread&& other) noexcept;
     thread(detail::thread_move_t<thread> other);
 
 [variablelist
@@ -297,6 +341,7 @@
 
 [section:move_assignment Move assignment operator]
 
+ thread& operator=(thread&& other) noexcept;
     thread& operator=(detail::thread_move_t<thread> other);
 
 [variablelist
@@ -328,7 +373,13 @@
 
 [[Postconditions:] [`*this` refers to the newly created thread of execution.]]
 
-[[Throws:] [__thread_resource_error__ if an error occurs.]]
+[[Throws:] [__thread_resource_error__ if an error occurs. ]]
+
+[[Error Conditions:] [
+
+[*resource_unavailable_try_again] : the system lacked the necessary resources to create an- other thread, or the system-imposed limit on the number of threads in a process would be exceeded.
+
+]]
 
 ]
 
@@ -352,6 +403,12 @@
 
 [[Throws:] [__thread_resource_error__ if an error occurs.]]
 
+[[Error Conditions:] [
+
+[*resource_unavailable_try_again] : the system lacked the necessary resources to create an- other thread, or the system-imposed limit on the number of threads in a process would be exceeded.
+
+]]
+
 [[Note:] [Currently up to nine additional arguments `a1` to `a9` can be specified in addition to the function `f`.]]
 
 ]
@@ -374,7 +431,7 @@
 
 [section:joinable Member function `joinable()`]
 
- bool joinable() const;
+ bool joinable() const noexcept;
 
 [variablelist
 
@@ -399,7 +456,19 @@
 
 [[Postconditions:] [If `*this` refers to a thread of execution on entry, that thread of execution has completed. `*this` no longer refers to any thread of execution.]]
 
-[[Throws:] [__thread_interrupted__ if the current thread of execution is interrupted.]]
+[[Throws:] [__thread_interrupted__ if the current thread of execution is interrupted or `system_error`]]
+
+[[Error Conditions:] [
+
+[*resource_deadlock_would_occur]: if deadlock is detected or this->get_id() == std::this_thread::get_id().
+
+[/
+[*no_such_process]: if the thread is not valid.
+
+[*invalid_argument]: if the thread is not joinable.
+]
+
+]]
 
 [[Notes:] [`join()` is one of the predefined __interruption_points__.]]
 
@@ -407,7 +476,7 @@
 
 [endsect]
 
-[section:timed_join Member function `timed_join()`]
+[section:timed_join Member function `timed_join()` DEPRECATED V2]
 
     bool timed_join(const system_time& wait_until);
 
@@ -428,7 +497,19 @@
 has completed, and `*this` no longer refers to any thread of execution. If this call to `timed_join` returns `false`, `*this` is
 unchanged.]]
 
-[[Throws:] [__thread_interrupted__ if the current thread of execution is interrupted.]]
+[[Throws:] [__thread_interrupted__ if the current thread of execution is interrupted or `system_error`]]
+
+[[Error Conditions:] [
+
+[*resource_deadlock_would_occur]: if deadlock is detected or this->get_id() == std::this_thread::get_id().
+
+[/
+[*no_such_process]: if the thread is not valid.
+
+[*invalid_argument]: if the thread is not joinable.
+]
+
+]]
 
 [[Notes:] [`timed_join()` is one of the predefined __interruption_points__.]]
 
@@ -436,6 +517,86 @@
 
 [endsect]
 
+[section:try_join_for Member function `try_join_for()`]
+
+ template <class Rep, class Period>
+ bool try_join_for(const chrono::duration<Rep, Period>& rel_time);
+
+[variablelist
+
+[[Preconditions:] [`this->get_id()!=boost::this_thread::get_id()`]]
+
+[[Effects:] [If `*this` refers to a thread of execution, waits for that thread of execution to complete,
+the specified duration `rel_time` has elapsed. If `*this` doesn't refer to a thread of execution, returns immediately.]]
+
+[[Returns:] [`true` if `*this` refers to a thread of execution on entry, and that thread of execution has completed before the call
+times out, `false` otherwise.]]
+
+[[Postconditions:] [If `*this` refers to a thread of execution on entry, and `try_join_for` returns `true`, that thread of execution
+has completed, and `*this` no longer refers to any thread of execution. If this call to `try_join_for` returns `false`, `*this` is
+unchanged.]]
+
+[[Throws:] [__thread_interrupted__ if the current thread of execution is interrupted or `system_error`]]
+
+[[Error Conditions:] [
+
+[*resource_deadlock_would_occur]: if deadlock is detected or this->get_id() == std::this_thread::get_id().
+
+[/
+[*no_such_process]: if the thread is not valid.
+
+[*invalid_argument]: if the thread is not joinable.
+]
+
+]]
+
+[[Notes:] [`try_join_for()` is one of the predefined __interruption_points__.]]
+
+]
+
+[endsect]
+
+[section:try_join_until Member function `try_join_until()`]
+
+ template <class Clock, class Duration>
+ bool try_join_until(const chrono::time_point<Clock, Duration>& abs_time);
+
+[variablelist
+
+[[Preconditions:] [`this->get_id()!=boost::this_thread::get_id()`]]
+
+[[Effects:] [If `*this` refers to a thread of execution, waits for that thread of execution to complete, the time `abs_time` has
+been reach. If `*this` doesn't refer to a thread of execution, returns immediately.]]
+
+[[Returns:] [`true` if `*this` refers to a thread of execution on entry, and that thread of execution has completed before the call
+times out, `false` otherwise.]]
+
+[[Postconditions:] [If `*this` refers to a thread of execution on entry, and `try_join_until` returns `true`, that thread of execution
+has completed, and `*this` no longer refers to any thread of execution. If this call to `try_join_until` returns `false`, `*this` is
+unchanged.]]
+
+[[Throws:] [__thread_interrupted__ if the current thread of execution is interrupted or `system_error`]]
+
+[[Error Conditions:] [
+
+[*resource_deadlock_would_occur]: if deadlock is detected or this->get_id() == std::this_thread::get_id().
+
+[/
+[*no_such_process]: if the thread is not valid.
+
+[*invalid_argument]: if the thread is not joinable.
+]
+
+]]
+
+[[Notes:] [`try_join_until()` is one of the predefined __interruption_points__.]]
+
+]
+
+[endsect]
+
+
+
 [section:detach Member function `detach()`]
 
     void detach();
@@ -455,7 +616,7 @@
 
 [section:get_id Member function `get_id()`]
 
- thread::id get_id() const;
+ thread::id get_id() const noexcept;
 
 [variablelist
 
@@ -487,7 +648,7 @@
 
 [section:hardware_concurrency Static member function `hardware_concurrency()`]
 
- unsigned hardware_concurrency();
+ unsigned hardware_concurrency() noexecpt;
 
 [variablelist
 
@@ -540,7 +701,7 @@
 
 [endsect]
 
-[section:sleep Static member function `sleep()`]
+[section:sleep Static member function `sleep()` DEPRECATED V2]
 
     void sleep(system_time const& abs_time);
 
@@ -556,7 +717,7 @@
 
 [endsect]
 
-[section:yield Static member function `yield()`]
+[section:yield Static member function `yield()` DEPRECATED V2]
 
     void yield();
 
@@ -570,7 +731,7 @@
 
 [section:swap Member function `swap()`]
 
- void swap(thread& other);
+ void swap(thread& other) noexcept;
 
 [variablelist
 
@@ -590,7 +751,7 @@
 
     #include <boost/thread/thread.hpp>
 
- void swap(thread& lhs,thread& rhs);
+ void swap(thread& lhs,thread& rhs) noexcept;
 
 [variablelist
 
@@ -628,14 +789,14 @@
     class thread::id
     {
     public:
- id();
+ id() noexcept;
 
- bool operator==(const id& y) const;
- bool operator!=(const id& y) const;
- bool operator<(const id& y) const;
- bool operator>(const id& y) const;
- bool operator<=(const id& y) const;
- bool operator>=(const id& y) const;
+ bool operator==(const id& y) const noexcept;
+ bool operator!=(const id& y) const noexcept;
+ bool operator<(const id& y) const noexcept;
+ bool operator>(const id& y) const noexcept;
+ bool operator<=(const id& y) const noexcept;
+ bool operator>=(const id& y) const noexcept;
 
         template<class charT, class traits>
         friend std::basic_ostream<charT, traits>&
@@ -644,7 +805,7 @@
 
 [section:constructor Default constructor]
 
- id();
+ id() noexcept;
 
 [variablelist
 
@@ -658,7 +819,7 @@
 
 [section:is_equal `operator==`]
 
- bool operator==(const id& y) const;
+ bool operator==(const id& y) const noexcept;
 
 [variablelist
 
@@ -673,7 +834,7 @@
 
 [section:not_equal `operator!=`]
 
- bool operator!=(const id& y) const;
+ bool operator!=(const id& y) const noexcept;
 
 [variablelist
 
@@ -688,7 +849,7 @@
 
 [section:less_than `operator<`]
 
- bool operator<(const id& y) const;
+ bool operator<(const id& y) const noexcept;
 
 [variablelist
 
@@ -707,7 +868,7 @@
 
 [section:greater_than `operator>`]
 
- bool operator>(const id& y) const;
+ bool operator>(const id& y) const noexcept;
 
 [variablelist
 
@@ -721,7 +882,7 @@
 
 [section:less_than_or_equal `operator<=`]
 
- bool operator<=(const id& y) const;
+ bool operator<=(const id& y) const noexcept;
 
 [variablelist
 
@@ -735,7 +896,7 @@
 
 [section:greater_than_or_equal `operator>=`]
 
- bool operator>=(const id& y) const;
+ bool operator>=(const id& y) const noexcept;
 
 [variablelist
 
@@ -771,13 +932,34 @@
 
 [section:this_thread Namespace `this_thread`]
 
+
+ namespace boost {
+ 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);
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
+
+ void interruption_point();
+ bool interruption_requested();
+ bool interruption_enabled();
+ class disable_interruption;
+ class restore_interruption;
+ }
+ }
+
 [section:get_id Non-member function `get_id()`]
 
     #include <boost/thread/thread.hpp>
 
     namespace this_thread
     {
- thread::id get_id();
+ thread::id get_id() noexcept;
     }
 
 [variablelist
@@ -847,7 +1029,7 @@
 
 [endsect]
 
-[section:sleep Non-member function `sleep()`]
+[section:sleep Non-member function `sleep()` DEPRECATED V2]
 
     #include <boost/thread/thread.hpp>
 
@@ -872,6 +1054,55 @@
 
 [endsect]
 
+[section:sleep_until Non-member function `sleep_until()`]
+
+ #include <boost/thread/thread.hpp>
+
+ namespace this_thread
+ {
+ template <class Clock, class Duration>
+ void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
+ }
+
+[variablelist
+
+[[Effects:] [Suspends the current thread until the time period
+specified by `rel_time` has elapsed or the time point specified by
+`abs_time` has been reached.]]
+
+[[Throws:] [Nothing if Clock satisfies the TrivialClock requirements and operations of Duration
+do not throw exceptions. __thread_interrupted__ if the current thread of execution is interrupted. ]]
+
+[[Notes:] [`sleep_until()` is one of the predefined __interruption_points__.]]
+
+]
+
+[endsect]
+
+[section:sleep_for Non-member function `sleep_for()`]
+
+ #include <boost/thread/thread.hpp>
+
+ namespace this_thread
+ {
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
+ }
+
+[variablelist
+
+[[Effects:] [Suspends the current thread until the time point specified by
+`abs_time` has been reached.]]
+
+[[Throws:] [Nothing if operations of chrono::duration<Rep, Period> do not throw exceptions. __thread_interrupted__ if the current thread of execution is interrupted.]]
+
+[[Notes:] [`sleep_for()` is one of the predefined __interruption_points__.]]
+
+]
+
+[endsect]
+
+
 [section:yield Non-member function `yield()`]
 
     #include <boost/thread/thread.hpp>


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