Boost C++ Libraries: Ticket #5194: unique_lock::unlock() does not protect modification of is_locked with mutex https://svn.boost.org/trac10/ticket/5194 <p> Shouldn't first is_locked=false and then m-&gt;unlock()? Otherwise is_locked value is undetermined in case of simultaneous calls to lock() and unlock()... </p> <p> void unlock() { ... m-&gt;unlock(); is_locked=false; } </p> <p> void lock() { ... m-&gt;lock(); is_locked=true; } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5194 Trac 1.4.3 Steven Watanabe Wed, 16 Feb 2011 15:55:29 GMT status, component changed; resolution set https://svn.boost.org/trac10/ticket/5194#comment:1 https://svn.boost.org/trac10/ticket/5194#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">thread</span> </li> </ul> <p> A unique_lock is not intended to be accessed concurrently from multiple threads. </p> Ticket