Re: [Boost-bugs] [Boost C++ Libraries] #5516: Upgrade lock is not acquired when previous upgrade lock releases if another read lock is present

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5516: Upgrade lock is not acquired when previous upgrade lock releases if another read lock is present
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-09 22:50:05


#5516: Upgrade lock is not acquired when previous upgrade lock releases if another
read lock is present
------------------------------------+---------------------------------------
  Reporter: fred@… | Owner: viboes
      Type: Support Requests | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------+---------------------------------------

Comment (by fred@…):

 Viboes, agreed, last steps don't matter. My concern here is on the 7th
 step:

 m1 - Trying to take an shared lock[[BR]]
 m1 - Took a shared lock[[BR]]
 m2 - Trying to take an upgradable lock[[BR]]
 m2 - Took an upgradable lock[[BR]]
 m3 - Trying to take an upgradable lock[[BR]]
 m2 - Released an upgradable lock[[BR]]
 ** here I would expect m3 to be able to take the upgradable lock, even
 though m1 still has a read lock **[[BR]]
 m1 - Released the lock

 Because the "release_waiters()" is only called when there are no more
 readers, we ignore the case when a thread wanting an upgradable lock
 should be waken up when there are still read locks going on.

 This makes the locking non-eager.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5516#comment:7>
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:08 UTC