[Boost-bugs] [Boost C++ Libraries] #13115: shared_mutex's exclusive_waiting_blocked may cause deadlock if readers have some dependency.

Subject: [Boost-bugs] [Boost C++ Libraries] #13115: shared_mutex's exclusive_waiting_blocked may cause deadlock if readers have some dependency.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-07-11 00:48:41


#13115: shared_mutex's exclusive_waiting_blocked may cause deadlock if readers have
some dependency.
------------------------------+------------------------------
 Reporter: yangyihao1992@… | Owner: Anthony Williams
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.53.0 | Severity: Regression
 Keywords: |
------------------------------+------------------------------
 I'm using boost::shared_mutex for the reader/writer. My readers have some
 kinds of dependency which mean Reader A will exit only after Reader B
 finish. At this situation, exclusive_waiting_blocked will block other
 readers even when there exists some readers already get the shared_lock,
 which cause the deadlock.

 I suppose if there are readers already hold the shared_lock, other readers
 should be able to gain the shared_lock as well. unique_lock should exclude
 other readers only when all existing readers are done. Do I make sense?

 Is this a semantic unclear? Any solution to fix my problem? Is there any
 reader-biased shared_lock in boost?

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13115>
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-07-11 00:51:40 UTC