Subject: [Boost-bugs] [Boost C++ Libraries] #6674: shared_mutex: try_lock_upgrade_until doesn't works
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-10 16:10:48
#6674: shared_mutex: try_lock_upgrade_until doesn't works
-------------------------------------+--------------------------------------
Reporter: viboes | Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
There is a bug on the code of shared_mutex::try_lock_upgrade_until. The
following change fixes it.
{{{
template <class Clock, class Duration>
bool try_lock_upgrade_until(const chrono::time_point<Clock,
Duration>& abs_time)
boost::mutex::scoped_lock lk(state_change);
while(state.exclusive || state.exclusive_waiting_blocked ||
state.upgrade)
{
- if(cv_status::no_timeout ==
shared_cond.wait_until(lk,abs_time))
+ if(cv_status::timeout ==
shared_cond.wait_until(lk,abs_time))
{
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6674> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC