The new set of tests iterates over Boost.Thread public headers and verifies that
each header is self-contained, i.e. doesn't have any missing includes and
contains syntactically correct content. On Windows and Cygwin, a second test
per each header is generated, which includes the header after windows.h. This
verifies that the header doesn't have conflicts with Windows SDK and that
includeing windows.h does not break platform detection in Boost.Thread.
This set of tests would have detected the bug fixed by
https://github.com/boostorg/thread/pull/263.
boost::this_thread::sleep_for is allowed to sleep longer than the
requested sleep time. This seems to happen especially on virtualized
systems, such as CircleCI.
This check may or may not be true depending on how long it takes pt1 to
finish executing. You can verify this by adding a sleep before the check
in which case "is_ready()" is always true.
This check may or may not be true depending on how long it takes p1 to
finish executing. You can verify this by adding a sleep before the check
in which case "is_ready()" is always true.
Therefore get rid of that and replace inheritance by lifting std::iterator's members into the derived class.
Signed-off-by: Daniela Engert <dani@ngrt.de>
* Fixed try_unlock_shared_and_lock_until/for() and
try_unlock_shared_and_lock_upgrade_until/for() so that they wait on the
correct condition variable for the associated predicate.
* Fixed try_unlock_shared_and_lock_until/for() and
try_unlock_upgrade_and_lock_until/for() so that they take the
write_entered_ flag before waiting for all shared readers to unlock. This
prevents new readers from taking a shared lock or new writers from taking
the exclusive lock while these functions are waiting to take the
exclusive lock.
* Changed notify_all() calls to occur while the mutex is being held to be
consistent with the notify_one() calls and the existing
pthread/shared_mutex.hpp implementation.
* Added BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS ifdefs.
* Added BOOST_ASSERT() statements to verify correct usage and operation.
* Fixed an incorrect test case that the BOOST_ASSERT() statements
uncovered.
* Added comments to explain certain design decisions.
* Used the predicate version of condition_variable::wait_until() which
correctly handles time jump events.
* Fixed an issue with sync_timed_queue::pull_until()/pull_for() where
they could incorrectly return queue_op_status::timeout instead of
queue_op_status::success.
* Changed sync_timed_queue::wait_pull() to return
queue_op_status::success instead of queue_op_status::closed when the
queue has been closed but an item is available and is ready to be
pulled off the queue.
* Changed sync_priority_queue::pull_until()/pull_for() and
sync_timed_queue::pull_until()/pull_for() to return
queue_op_status::closed instead of throwing an exception when the
queue is closed since they have a queue_op_status return type.