Skip to content

Commit

Permalink
Thread: merge from trunk 1.54. Fix #8027,#8323,#8337.
Browse files Browse the repository at this point in the history
[SVN r83660]
  • Loading branch information
viboes committed Mar 31, 2013
1 parent b1a6748 commit 677dbe7
Show file tree
Hide file tree
Showing 101 changed files with 2,763 additions and 554 deletions.
25 changes: 20 additions & 5 deletions doc/changes.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,42 @@

[section:changes History]

[/
[heading Version 4.2.0 - boost 1.55]

[*New Features:]

* [@http://svn.boost.org/trac/boost/ticket/8273 #8273] Add externally locked streams
* [@http://svn.boost.org/trac/boost/ticket/8274 #8274] Add concurrent queue

[*Fixed Bugs:]

]

[heading Version 4.1.0 - boost 1.54]

[*New Features:]

* [@http://svn.boost.org/trac/boost/ticket/7285 #7285] C++11 compliance: Allow to pass movable arguments for call_once.
* [@http://svn.boost.org/trac/boost/ticket/7449 #7449] Synchro: Add a synchronized value class

[heading Version 4.0.0 - boost 1.53]
[*Fixed Bugs:]

* [@http://svn.boost.org/trac/boost/ticket/4882 #4882] Win32 shared_mutex does not handle timeouts correctly.
* [@http://svn.boost.org/trac/boost/ticket/6652 #6652] Boost.Thread shared_mutex.hpp:50:99: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
* [@http://svn.boost.org/trac/boost/ticket/7720 #7720] exception lock_error while intensive locking/unlocking of mutex
* [@http://svn.boost.org/trac/boost/ticket/7755 #7755] Thread: deadlock with shared_mutex on Windows
* [@http://svn.boost.org/trac/boost/ticket/4882 #8070] prefer GetTickCount64 over GetTickCount
* [@http://svn.boost.org/trac/boost/ticket/8027 #8027] thread library fails to compile with Visual Studio 2003
* [@http://svn.boost.org/trac/boost/ticket/8070 #8070] prefer GetTickCount64 over GetTickCount
* [@http://svn.boost.org/trac/boost/ticket/8136 #8136] boost::this_thread::sleep_for() sleeps longer than it should in Windows
* [@http://svn.boost.org/trac/boost/ticket/8212 #8212] Boost thread compilation error on Solaris 10
* [@http://svn.boost.org/trac/boost/ticket/8237 #8237] fix documentation for 'thread_group'
* [@http://svn.boost.org/trac/boost/ticket/8239 #8239] barrier::wait() not marked as interruption_point
* [@http://svn.boost.org/trac/boost/ticket/8323 #8323] boost::thread::try_join_for/try_join_until may block indefinitely due to a combination of problems in Boost.Thread and Boost.Chrono
* [@http://svn.boost.org/trac/boost/ticket/8337 #8337] The internal representation of "std::string(this->code()->message())" escapes, but is destroyed when it exits scope.


[*New Features:]

[*Fixed Bugs:]
[heading Version 4.0.0 - boost 1.53]

[/
[*Breaking changes:]
Expand Down
2 changes: 1 addition & 1 deletion doc/future_ref.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ provides the result of the function in a future object with which it shares a sh

[warning `async(launch::deferred, F)` is NOT YET IMPLEMENTED!]

[warning the variadic prototype is provided only on C++11 compilers supporting rvalue references, variadic templates, decltype and a standard library providing <tuple>, and BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK is defined.]
[warning the variadic prototype is provided only on C++11 compilers supporting rvalue references, variadic templates, decltype and a standard library providing <tuple> (waiting for a boost::tuple that is move aware), and BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK is defined.]

[heading Non-Variadic variant]

Expand Down
2 changes: 1 addition & 1 deletion doc/internal_locking.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The above example works well as long as the bankAgent and Joe doesn't access Joe
mtx_.lock();
int b = balance_;
mtx_.unlock();
return balance_;
return b;
}
};

Expand Down
53 changes: 51 additions & 2 deletions doc/mutex_concepts.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Lock ownership acquired through a call to __lock_ref__ must be released through

[variablelist

[[Requires:] [The calling thread doesn't owns the mutex if the mutex is not recursive.]]

[[Effects:] [The current thread blocks until ownership can be obtained for the current thread.]]

[[Synchronization:] [Prior `unlock()` operations on the same object synchronizes with this operation. ]]
Expand Down Expand Up @@ -97,7 +99,12 @@ Lock ownership acquired through a call to __lock_ref__ must be released through
}
}

Some of the algorithms on mutexes use this trait via SFINAE. If BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES is defined you will need to specialize this traits for the models of BasicLockable you could build.

Some of the algorithms on mutexes use this trait via SFINAE.

This trait is true_type if the parameter L meets the __Lockable requirements.

[warning If BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES is defined you will need to specialize this traits for the models of BasicLockable you could build.]

[endsect]
[endsect]
Expand All @@ -121,6 +128,9 @@ Lock ownership acquired through a call to __try_lock_ref__ must be released thro

[variablelist


[[Requires:] [The calling thread doesn't owns the mutex if the mutex is not recursive.]]

[[Effects:] [Attempt to obtain ownership for the current thread without blocking.]]

[[Synchronization:] [If `try_lock()` returns true, prior `unlock()` operations on the same object synchronize with this operation.]]
Expand Down Expand Up @@ -152,7 +162,11 @@ failure, even in the absence of spurious failures.]]
}
}

Some of the algorithms on mutexes use this trait via SFINAE. If BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES is defined you will need to specialize this traits for the models of Lockable you could build.
Some of the algorithms on mutexes use this trait via SFINAE.

This trait is true_type if the parameter L meets the __Lockable requirements.

[warning If BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES is defined you will need to specialize this traits for the models of Lockable you could build.]

[endsect]
[endsect]
Expand Down Expand Up @@ -185,6 +199,37 @@ It should be specialized by the user providing other model of recursive lockable

[endsect]

[section:is_recursive_basic_lockable `is_recursive_basic_lockable` trait -- EXTENSION]

// #include <boost/thread/lockable_traits.hpp>
namespace boost
{
namespace sync
{
template<typename L>
class is_recursive_basic_lockable;// EXTENSION
}
}

This traits is true_type if is_basic_lockable and is_recursive_mutex_sur_parolle.

[endsect]
[section:is_recursive_lockable `is_recursive_lockable` trait -- EXTENSION]

// #include <boost/thread/lockable_traits.hpp>
namespace boost
{
namespace sync
{
template<typename L>
class is_recursive_lockable;// EXTENSION
}
}

This traits is true_type if is_lockable and is_recursive_mutex_sur_parolle.

[endsect]

[endsect]


Expand Down Expand Up @@ -220,6 +265,8 @@ Lock ownership acquired through a call to __try_lock_for or __try_lock_until mus

[variablelist

[[Requires:] [The calling thread doesn't owns the mutex if the mutex is not recursive.]]

[[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__.]]

Expand All @@ -239,6 +286,8 @@ reached. If the specified time has already passed, behaves as __try_lock_ref__.]

[variablelist

[[Requires:] [The calling thread doesn't owns the mutex if the mutex is not recursive.]]

[[Effects:] [As-if `__try_lock_until(chrono::steady_clock::now() + rel_time)`.]]

[[Synchronization:] [If `try_lock_for()` returns true, prior `unlock()` operations on the same object synchronize with this operation.]]
Expand Down
Loading

0 comments on commit 677dbe7

Please sign in to comment.