Know Bugs:
-
#2442
Application statically linked with Boost.Thread crashes when Google Desktop
is installed (Windows XP)
-
#3926
thread_specific_ptr + dlopen library causes a SIGSEGV.
-
#4833
MinGW/test_tss_lib: Support of automatic tss cleanup for native threading
API not available
-
#6782
call_once uses incorrect barrier intrinsic on Visual Studio
-
#7319
Take care of c++std-lib-32966 issue
-
#8600
wait_for_any hangs, if called with multiple copies of shared_future referencing
same task
-
#9307
future::fallback_to assert with ERRORRRRR boost: mutex lock failed in pthread_mutex_lock:
Invalid argument
-
#9308
future::async fails with terminate called throwing an exception when called
with a lambda - clang-darwin-asan11
-
#9310
test_4648_lib fails on clang-darwin-asan11
-
#9311
ex_lambda_future fails on msvc-11.0
-
#9425
Boost promise & future does not use supplied allocator for value storage
-
#9558
future continuations unit test hangs in get()/pthread_cond_wait() on Mac
10.7/32-bit/x86/darwin-4.2.1
Please take a look at thread
Know Bugs to see the current state.
Please take a look at thread
trunk regression test to see the last snapshot.
Sever limitations:
There are some severe bugs that prevent the use of the library on concrete
contexts, in particular:
-
on thread specific storage that prevent the library to be used with dynamic
libraries,
-
The experimental features of boost::future have some severe holes that
make the program crash unexpectedly.
New Experimental Features:
-
#7446
Async: Add when_any.
-
#7447
Async: Add when_all.
-
#7448
Async: Add async taking a scheduler parameter.
-
#8274
Synchro: Add concurrent queue
-
#8518
Synchro: Add a latch class.
-
#8513
Async: Add a basic thread_pool executor.
-
#8516
Async: Add future/shared_future::then taking a scheduler as parameter.
Fixed Bugs:
-
#8070
prefer GetTickCount64 over GetTickCount
-
#9333
ex_scoped_thread compile fails on msvc-12.0
-
#9366
async(Executor, ...) fails to compile with msvc-10,11,12
-
#9402
test_excutor regression on msvc-10,11,12
-
#9404
ex_make_future regression error
-
#9471
Synchronization documentation nits
-
#9535
Missing exception safety might result in crash
-
#9618
try_join_for problem: program is not terminate.
-
#9673
thread compilation with MingW/gcc on Windows gives errors
-
#9708
boost::condition_variable::timed_wait unexpectedly wakes up while should
wait infinite
-
#9711
future continuation called twice
Know Bugs:
-
#2442
Application statically linked with Boost.Thread crashes when Google Desktop
is installed (Windows XP)
-
#3926
thread_specific_ptr + dlopen library causes a SIGSEGV.
-
#4833
MinGW/test_tss_lib: Support of automatic tss cleanup for native threading
API not available
-
#6782
call_once uses incorrect barrier intrinsic on Visual Studio
-
#7319
Take care of c++std-lib-32966 issue
-
#8600
wait_for_any hangs, if called with multiple copies of shared_future referencing
same task
-
#9307
future::fallback_to assert with ERRORRRRR boost: mutex lock failed in pthread_mutex_lock:
Invalid argument
-
#9308
future::async fails with terminate called throwing an exception when called
with a lambda - clang-darwin-asan11
-
#9311
ex_lambda_future fails on msvc-11.0
-
#9310
test_4648_lib fails on clang-darwin-asan11
Please take a look at thread
trunk regression test to see the current state.
Sever limitations:
There are some severe bugs that prevent the use of the library on concrete
contexts, in particular:
-
on thread specific storage that prevent the library to be used with dynamic
libraries,
-
The experimental features of boost::future have some severe holes that
make the program crash unexpectedly.
New Features:
-
#8519
Synchro: Update class barrier with a completion function.
-
#8515
Async: Add shared_future::then.
-
#8519
Synchro: Update class barrier with a completion function
-
#8615
Async: Replace make_future/make_shared_future by make_ready_future.
-
#8627
Async: Add future<>::unwrap and unwrapping constructor.
-
#8677
Async: Add future<>::get_or.
-
#8678
Async: Add future<>::fallback_to.
-
#8891
upgrade_to_unique_lock: missing mutex() function.
-
#8955
Request for more efficient way to get exception_ptr from future.
Fixed Bugs:
-
#7461
detail::win32::ReleaseSemaphore may be called with count_to_release equal
to 0
-
#8070
prefer GetTickCount64 over GetTickCount
-
#8768
win32 condition_variable::wait_until infinite wait in rare cases.
-
#8817
Boost Thread Windows CE _createthreadex handling breaks mingw w64.
-
#8943
Failed to compile code using boost::call_once with Intel C++ Composer XE
2013 on Windows.
-
#8931
Typos in external_locking reference.
-
#9029
Misprint in documentation.
-
#9037
gcc -Wshadow gives warnings in condition_variable{,_fwd}.hpp.
-
#9041
Boost.Thread DSO's may need to link with Boost.Atomic.
-
#9048
boost::scoped_thread useless ctor with variadic template arguments.
-
#9079
Condition variable will wait forever for some timepoint values (Win).
New Features:
-
#7285
C++11 compliance: Allow to pass movable arguments for call_once.
-
#7445
Async: Add future<>.then
-
#7449
Synchro: Add a synchronized value class
Fixed Bugs:
-
#4878
MinGW 4.5.0 undefined reference to bool interruptible_wait(detail::win32::handle
handle_to_wait_for,detail::t imeout target_time).
-
#4882
Win32 shared_mutex does not handle timeouts correctly.
-
#5752
boost::call_once() is unreliable on some platforms
-
#6652
Boost.Thread shared_mutex.hpp:50:99: warning: dereferencing type-punned
pointer will break strict-aliasing rules Wstrict-aliasing
-
#6843
[Intel C++] Compile Errors with '#include <atomic>'
-
#6966
future boost::future_category inconsistent dll linkage
-
#7720
exception lock_error while intensive locking/unlocking of mutex
-
#7755
Thread: deadlock with shared_mutex on Windows
-
#7980
Build error: msvc-11.0 and BOOST_THREAD_DONT_USE_DATETIME
-
#7982
pthread_delay_np() parm compile error on AIX
-
#8027
thread library fails to compile with Visual Studio 2003
-
#8070
prefer GetTickCount64 over GetTickCount
-
#8136
boost::this_thread::sleep_for() sleeps longer than it should in Windows
-
#8212
Boost thread compilation error on Solaris 10
-
#8237
fix documentation for 'thread_group'
-
#8239
barrier::wait() not marked as interruption_point
-
#8323
boost::thread::try_join_for/try_join_until may block indefinitely due to
a combination of problems in Boost.Thread and Boost.Chrono
-
#8337
The internal representation of "std::string(this->code()->message())"
escapes, but is destroyed when it exits scope.
-
#8371
C++11 once_flag enabled when constexpr is not available
-
#8422
Assertion in win32::WaitForSingleObject()
-
#8443
Header file inclusion order may cause crashes
-
#8451
Missing documented function 'boost::scoped_thread::joinable'
-
#8458
-DBOOST_THREAD_DONT_USE_CHRONO in thread.obj.rsp but not explicitly set
-
#8530
[Coverity] Unused variable thread_handle, uninitialized variable cond_mutex
in thread/pthread/thread_data.hpp
-
#8550
static linking of Boost.Thread with an MFC-Dll
-
#8576
"sur parolle" should be "sur parole".
-
#8596
With C++0x enabled, boost::packaged_task stores a reference to function
objects, instead of a copy.
-
#8626
Reintroduce BOOST_VERIFY on pthread_mutex_destroy return type
-
#8645
Typo in Strict lock definition
-
#8671
promise: set_..._at_thread_exit
-
#8672
future<>::then(void()) doesn't works
-
#8674
Futures as local named objects can't be returned with implicit move.
Deprecated features:
|
Warning |
Deprecated features since boost 1.53 will be available only until boost 1.58.
|
-
C++11 compliance: packaged_task<R> is deprecated, use instead packaged_task<R()>.
See BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK and BOOST_THREAD_DONT_PROVIDE_SIGNATURE_PACKAGED_TASK
-
#7537
deprecate Mutex::scoped_lock and scoped_try_lock and boost::condition
New Features:
-
#6270
c++11 compliance: Add thread constructor from movable callable and movable
arguments Provided when BOOST_THREAD_PROVIDES_VARIADIC_THREAD is defined
(Default value from Boost 1.55): See BOOST_THREAD_PROVIDES_VARIADIC_THREAD
and BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD.
-
#7279
C++11 compliance: Add noexcept in system related functions
-
#7280
C++11 compliance: Add promise::...at_thread_exit functions
-
#7281
C++11 compliance: Add ArgTypes to packaged_task template. Provided when
BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK is defined (Default value
from Boost 1.55). See BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK and
BOOST_THREAD_DONT_PROVIDE_SIGNATURE_PACKAGED_TASK.
-
#7282
C++11 compliance: Add packaged_task::make_ready_at_thread_exit function
-
#7285
C++11 compliance: Allow to pass movable arguments for call_once
-
#7412
C++11 compliance: Add async from movable callable and movable arguments
Provided when BOOST_THREAD_PROVIDES_VARIADIC_THREAD and BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
are defined (Default value from Boost 1.55): See BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
and BOOST_THREAD_DONT_PROVIDE_SIGNATURE_PACKAGED_TASK, BOOST_THREAD_PROVIDES_VARIADIC_THREAD
and BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD.
-
#7413
C++11 compliance: Add async when the launch policy is deferred.
-
#7414
C++11 compliance: future::get post-condition should be valid()==false.
-
#7422
Provide a condition variable with zero-overhead performance penality.
-
#7444
Async: Add make_future/make_shared_future.
-
#7540
Threads: Add a helper class that join a thread on destruction.
-
#7541
Threads: Add a thread wrapper class that joins on destruction.
-
#7575
C++11 compliance: A future created by async should "join" in
the destructor.
-
#7587
Synchro: Add strict_lock and nested_strict_lock.
-
#7588
Synchro: Split the locks.hpp in several files to limit dependencies.
-
#7590
Synchro: Add lockable concept checkers based on Boost.ConceptCheck.
-
#7591
Add lockable traits that can be used with enable_if.
-
#7592
Synchro: Add a null_mutex that is a no-op and that is a model of UpgardeLockable.
-
#7593
Synchro: Add a externally_locked class.
-
#7594
Threads: Allow to disable thread interruptions.
Fixed Bugs:
-
#5752
boost::call_once() is unreliable on some platforms
-
#7464
BOOST_TEST(n_alive == 1); fails due to race condition in a regression test
tool.
-
#7657
Serious performance and memory consumption hit if condition_variable methods
condition notify_one or notify_all is used repeatedly.
-
#7665
this_thread::sleep_for no longer uses steady_clock in thread.
-
#7668
thread_group::join_all() should check whether its threads are joinable.
-
#7669
thread_group::join_all() should catch resource_deadlock_would_occur.
-
#7671
Error including boost/thread.hpp header on iOS.
-
#7672
lockable_traits.hpp syntax error: "defined" token misspelled.
-
#7798
boost::future set_wait_callback thread safety issues.
-
#7808
Incorrect description of effects for this_thread::sleep_for and this_thread::sleep_until.
-
#7812
Returns: cv_status::no_timeout if the call is returning because the time
period specified by rel_time has elapsed, cv_status::timeout otherwise.
-
#7874
compile warning: thread.hpp:342: warning: type attributes are honored only
at type definition.
-
#7875
BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED should not be enabled
by default.
-
#7882
wrong exception text from condition_variable::wait(unique_lock<mutex>&).
-
#7890
thread::do_try_join_until() is missing a return type.
Deprecated Features:
Deprecated features since boost 1.50 available only until boost 1.55:
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_V3_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_V3_0_0. These deprecated features
will be only available until boost 1.55, that is you have yet 1 year to move
to the new features.
-
Time related functions don't using the Boost.Chrono library, use the chrono
overloads instead.
Breaking changes when BOOST_THREAD_VERSION==3 (Default value since Boost 1.53):
There are some new features which share the same interface but with different
behavior. These breaking features are provided by default when BOOST_THREAD_VERSION
is 3, but the user can however choose the version 2 behavior by defining the
corresponding macro. As for the deprecated features, these broken features
will be only available until boost 1.55.
-
#6229
Rename the unique_future to future following the c++11.
-
#6266
Breaking change: thread destructor should call terminate if joinable.
-
#6269
Breaking change: thread move assignment should call terminate if joinable.
New Features:
-
#2361
thread_specific_ptr: document nature of the key, complexity and rationale.
-
#4710
C++11 compliance: Missing async().
-
#7283
C++11 compliance: Add notify_all_at_thread_exit.
-
#7345
C++11 compliance: Add noexcept to recursive mutex try_lock.
Fixed Bugs:
-
#2797
Two problems with thread_specific_ptr.
-
#5274
failed to compile future.hpp with stlport 5.1.5 under msvc8.1, because
of undefined class.
-
#5431
compile error in Windows CE 6.0(interlocked).
-
#5696
win32 detail::set_tss_data does nothing when tss_cleanup_function is NULL.
-
#6931
mutex waits forwever with Intel C++ Compiler XE 12.1.5.344 Build 20120612
-
#7045
Thread library does not automatically compile date_time.
-
#7173
wrong function name interrupt_point().
-
#7200
Unable to build boost.thread modularized.
-
#7220
gcc 4.6.2 warns about inline+dllimport functions.
-
#7238
this_thread::sleep_for() does not respond to interrupt().
-
#7245
Minor typos on documentation related to version 3.
-
#7272
win32/thread_primitives.hpp: (Unneccessary) Warning.
-
#7284
Clarify that there is no access priority between lock and shared_lock on
shared mutex.
-
#7329
boost/thread/future.hpp does not compile on HPUX.
-
#7336
BOOST_THREAD_DONT_USE_SYSTEM doesn't work.
-
#7349
packaged_task holds reference to temporary.
-
#7350
allocator_destructor does not destroy object
-
#7360
Memory leak in pthread implementation of boost::thread_specific_ptr
-
#7370
Boost.Thread documentation
-
#7438
Segmentation fault in test_once regression test in group.join_all();
-
#7461
detail::win32::ReleaseSemaphore may be called with count_to_release equal
to 0
-
#7499
call_once doesn't call even once
Deprecated Features:
Deprecated features since boost 1.50 available only until boost 1.55:
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_V3_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_V3_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.
-
Time related functions don't using the Boost.Chrono library, use the chrono
overloads instead.
Breaking changes when BOOST_THREAD_VERSION==3:
There are some new features which share the same interface but with different
behavior. These breaking features are provided by default when BOOST_THREAD_VERSION
is 3, but the user can however choose the version 2 behavior by defining the
corresponding macro. As for the deprecated features, these broken features
will be only available until boost 1.55.
-
#6229
Rename the unique_future to future following the c++11.
-
#6266
Breaking change: thread destructor should call terminate if joinable.
-
#6269
Breaking change: thread move assignment should call terminate if joinable.
Fixed Bugs:
-
#4258
Linking with boost thread does not work on mingw/gcc 4.5.
-
#4885
Access violation in set_tss_data at process exit due to invalid assumption
about TlsAlloc.
-
#6931
mutex waits forwever with Intel Compiler and /debug:parallel
-
#7044
boost 1.50.0 header missing.
-
#7052
Thread: BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 only masks
thread::operator==, thread::operator!= forward declarations, not definitions.
-
#7066
An attempt to fix current_thread_tls_key static initialization order.
-
#7074
Multiply defined symbol boost::allocator_arg.
-
#7078
Trivial 64-bit warning fix on Windows for thread attribute stack size
-
#7089
BOOST_THREAD_WAIT_BUG limits functionality without solving anything
Breaking changes when BOOST_THREAD_VERSION==3:
-
#6229
Breaking change: Rename the unique_future to future following the c++11.
-
#6266
Breaking change: thread destructor should call terminate if joinable.
-
#6269
Breaking change: thread move assignment should call terminate if joinable.
New Features:
-
#1850
Request for unlock_guard to compliment lock_guard.
-
#2637
Request for shared_mutex duration timed_lock and timed_lock_shared.
-
#2741
Proposal to manage portable and non portable thread attributes.
-
#3567
Request for shared_lock_guard.
-
#6194
Adapt to Boost.Move.
-
#6195
c++11 compliance: Provide the standard time related interface using Boost.Chrono.
-
#6217
Enhance Boost.Thread shared mutex interface following Howard Hinnant proposal.
-
#6224
c++11 compliance: Add the use of standard noexcept on compilers supporting
them.
-
#6225
Add the use of standard =delete defaulted operations on compilers supporting
them.
-
#6226
c++11 compliance: Add explicit bool conversion from locks.
-
#6228
Add promise constructor with allocator following the standard c++11.
-
#6230
c++11 compliance: Follows the exception reporting mechanism as defined
in the c++11.
-
#6231
Add BasicLockable requirements in the documentation to follow c++11.
-
#6272
c++11 compliance: Add thread::id hash specialization.
-
#6273
c++11 compliance: Add cv_status enum class and use it on the conditions
wait functions.
-
#6342
c++11 compliance: Adapt the one_flag to the c++11 interface.
-
#6671
upgrade_lock: missing mutex and release functions.
-
#6672
upgrade_lock:: missing constructors from time related types.
-
#6675
upgrade_lock:: missing non-member swap.
-
#6676
lock conversion should be explicit.
-
Added missing packaged_task::result_type and packaged_task:: constructor
with allocator.
-
Added packaged_task::reset()
Fixed Bugs:
-
#2380
boost::move from lvalue does not work with gcc.
-
#2430
shared_mutex for win32 doesn't have timed_lock_upgrade.
-
#2575
Bug- Boost 1.36.0 on Itanium platform.
-
#3160
Duplicate tutorial code in boost::thread.
-
#4345
thread::id and joining problem with cascade of threads.
-
#4521
Error using boost::move on packaged_task (MSVC 10).
-
#4711
Must use implementation details to return move-only types.
-
#4921
BOOST_THREAD_USE_DLL and BOOST_THREAD_USE_LIB are crucial and need to be
documented.
-
#5013
documentation: boost::thread: pthreas_exit causes terminate().
-
#5173
boost::this_thread::get_id is very slow.
-
#5351
interrupt a future get boost::unknown_exception.
-
#5516
Upgrade lock is not acquired when previous upgrade lock releases if another
read lock is present.
-
#5990
shared_future<T>::get() has wrong return type.
-
#6174
packaged_task doesn't correctly handle moving results.
-
#6222
Compile error with SunStudio: unique_future move.
-
#6354
PGI: Compiler threading support is not turned on.
-
#6673
shared_lock: move assign doesn't works with c++11.
-
#6674
shared_mutex: try_lock_upgrade_until doesn't works.
-
#6908
Compile error due to unprotected definitions of _WIN32_WINNT and WINVER.
-
#6940
TIME_UTC is a macro in C11.
-
#6959
call of abs is ambiguous.
-
Fix issue signaled on the ML with task_object(task_object const&) in
presence of task_object(task_object &&)
Fixed Bugs:
-
#2309
Lack of g++ symbol visibility support in Boost.Thread.
-
#2639
documentation should be extended(defer_lock, try_to_lock, ...).
-
#3639
Boost.Thread doesn't build with Sun-5.9 on Linux.
-
#3762
Thread can't be compiled with winscw (Codewarrior by Nokia).
-
#3885
document about mix usage of boost.thread and native thread api.
-
#3975
Incorrect precondition for promise::set_wait_callback().
-
#4048
thread::id formatting involves locale
-
#4315
gcc 4.4 Warning: inline ... declared as dllimport: attribute ignored.
-
#4480
OpenVMS patches for compiler issues workarounds.
-
#4819
boost.thread's documentation misprints.
-
#5423
thread issues with C++0x.
-
#5617
boost::thread::id copy ctor.
-
#5739
set-but-not-used warnings with gcc-4.6.
-
#5826
threads.cpp: resource leak on threads creation failure.
-
#5839
thread.cpp: ThreadProxy leaks on exceptions.
-
#5859
win32 shared_mutex constructor leaks on exceptions.
-
#6100
Compute hardware_concurrency() using get_nprocs() on GLIBC systems.
-
#6168
recursive_mutex is using wrong config symbol (possible typo).
-
#6175
Compile error with SunStudio.
-
#6200
patch to have condition_variable and mutex error better handle EINTR.
-
#6207
shared_lock swap compiler error on clang 3.0 c++11.
-
#6208
try_lock_wrapper swap compiler error on clang 3.0 c++11.
The 1.41.0 release of Boost adds futures to the thread library. There are also
a few minor changes.
The 1.36.0 release of Boost includes a few new features in the thread library:
-
New generic
lock()
and try_lock()
functions for locking multiple mutexes at once.
-
Rvalue reference support for move semantics where the compilers supports
it.
-
A few bugs fixed and missing functions added (including the serious win32
condition variable bug).
-
scoped_try_lock
types are
now backwards-compatible with Boost 1.34.0 and previous releases.
-
Support for passing function arguments to the thread function by supplying
additional arguments to the
boost::thread
constructor.
-
Backwards-compatibility overloads added for
timed_lock
and timed_wait
functions
to allow use of xtime
for
timeouts.
Almost every line of code in Boost.Thread
has been changed since the 1.34 release of boost. However, most of the interface
changes have been extensions, so the new code is largely backwards-compatible
with the old code. The new features and breaking changes are described below.
-
Instances of
boost::thread
and of the various lock
types are now movable.
-
Threads can be interrupted at interruption
points.
-
Condition variables can now be used with any type that implements the
Lockable
concept, through the
use of boost::condition_variable_any
(boost::condition
is a typedef
to boost::condition_variable_any
, provided for
backwards compatibility). boost::condition_variable
is provided as an optimization, and will only work with boost::unique_lock<boost::mutex>
(boost::mutex::scoped_lock
).
-
Thread IDs are separated from
boost::thread
, so a thread can obtain
it's own ID (using boost::this_thread::get_id()
), and IDs can be used as keys in associative
containers, as they have the full set of comparison operators.
-
Timeouts are now implemented using the Boost DateTime library, through
a typedef
boost::system_time
for absolute timeouts, and
with support for relative timeouts in many cases. boost::xtime
is supported for backwards compatibility only.
-
Locks are implemented as publicly accessible templates
boost::lock_guard
,
boost::unique_lock
, boost::shared_lock
,
and boost::upgrade_lock
, which are templated on
the type of the mutex. The Lockable
concept has been extended
to include publicly available lock()
and unlock()
member functions, which are used by the lock types.
The list below should cover all changes to the public interface which break
backwards compatibility.
-
boost::try_mutex
has been removed, and
the functionality subsumed into boost::mutex
. boost::try_mutex
is left as a typedef
, but is no longer a separate class.
-
boost::recursive_try_mutex
has been removed,
and the functionality subsumed into boost::recursive_mutex
. boost::recursive_try_mutex
is left as
a typedef
, but is no longer
a separate class.
-
boost::detail::thread::lock_ops
has been removed. Code that
relies on the lock_ops
implementation detail will no longer work, as this has been removed, as
it is no longer necessary now that mutex types now have public lock()
and unlock()
member functions.
-
scoped_lock
constructors
with a second parameter of type bool
are no longer provided. With previous boost releases,
boost::mutex::scoped_lock some_lock(some_mutex,false);
could be used to create a lock object that was associated with a mutex,
but did not lock it on construction. This facility has now been replaced
with the constructor that takes a boost::defer_lock_type
as the second parameter:
boost::mutex::scoped_lock some_lock(some_mutex,boost::defer_lock);
-
The
locked()
member function of the scoped_lock
types has been renamed to owns_lock()
.
-
You can no longer obtain a
boost::thread
instance representing the
current thread: a default-constructed boost::thread
object is not associated
with any thread. The only use for such a thread object was to support the
comparison operators: this functionality has been moved to boost::thread::id
.
-
The broken
boost::read_write_mutex
has been replaced with
boost::shared_mutex
.
-
boost::mutex
is now never recursive.
For Boost releases prior to 1.35 boost::mutex
was recursive on Windows
and not on POSIX platforms.
-
When using a
boost::recursive_mutex
with a call to
boost::condition_variable_any::wait()
,
the mutex is only unlocked one level, and not completely. This prior behaviour
was not guaranteed and did not feature in the tests.