[Boost-bugs] [Boost C++ Libraries] #8455: scoped_lock keeps blocking if mutex unlocked

Subject: [Boost-bugs] [Boost C++ Libraries] #8455: scoped_lock keeps blocking if mutex unlocked
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-18 08:48:07


#8455: scoped_lock keeps blocking if mutex unlocked
-----------------------------------+----------------------------------------
 Reporter: Volker.Wippel@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: threads
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: concurrent |
-----------------------------------+----------------------------------------
 This program blocks but should not do, as far I understand unlocking
 mutexes.

 {{{

 #include <boost/thread/mutex.hpp>
 boost::mutex mut;
 void boostMutexImp1()
 {
     boost::mutex::scoped_lock lock(mut);
     mut.unlock(); // A: with this X blocks
     //lock.unlock(); // No influence if used also if before A
 }
 void boostMutexImp2()
 {
     boost::mutex::scoped_lock lock(mut); // X: blocks with A
 }
 void boostMutex()
 {
     boostMutexImp1();
     boostMutexImp2();
 }

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8455>
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:12 UTC