Boost C++ Libraries: Ticket #7586: Add a testable_mutex https://svn.boost.org/trac10/ticket/7586 <p> Based on Associate Mutexes with Data to Prevent Races, By Herb Sutter, May 13, 2010 - <a class="ext-link" href="http://www.drdobbs.com/windows/associate-mutexes-with-data-to-prevent-r/224701827?pgno=3"><span class="icon">​</span>http://www.drdobbs.com/windows/associate-mutexes-with-data-to-prevent-r/224701827?pgno=3</a> </p> <p> "Make our mutex testable if it isn't already. </p> <p> Many mutex services (including boost::mutex) don't provide a way to ask, "Do I already hold a lock on this mutex?" </p> <p> Sometimes it is needed to know if a method like is_held to be available. </p> <p> This wrapper associates an arbitrary lockable type with a thread id that stores the ID of the thread that currently holds the lockable. The thread id initially holds an invalid value that means no threads own the mutex. </p> <p> When we acquire a lock, we set the thread id; and when we release a lock, we reset it back to its default no id state." </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7586 Trac 1.4.3 viboes Mon, 29 Oct 2012 01:13:53 GMT milestone deleted https://svn.boost.org/trac10/ticket/7586#comment:1 https://svn.boost.org/trac10/ticket/7586#comment:1 <ul> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> <p> Committed in trunk revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/81088" title="Thread: Added testable_mutex">[81088]</a>. </p> Ticket viboes Mon, 29 Oct 2012 02:03:27 GMT status changed https://svn.boost.org/trac10/ticket/7586#comment:2 https://svn.boost.org/trac10/ticket/7586#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Sun, 02 Dec 2012 10:49:56 GMT <link>https://svn.boost.org/trac10/ticket/7586#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7586#comment:3</guid> <description> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/81667" title="Thread: merge from trunk 1.53">[81667]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 30 Mar 2013 09:51:23 GMT</pubDate> <title>milestone set https://svn.boost.org/trac10/ticket/7586#comment:4 https://svn.boost.org/trac10/ticket/7586#comment:4 <ul> <li><strong>milestone</strong> → <span class="trac-field-new">Boost 1.55.0</span> </li> </ul> Ticket viboes Mon, 16 Sep 2013 17:10:56 GMT milestone changed https://svn.boost.org/trac10/ticket/7586#comment:5 https://svn.boost.org/trac10/ticket/7586#comment:5 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.55.0</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> Ticket viboes Tue, 28 Jan 2014 21:04:20 GMT milestone changed https://svn.boost.org/trac10/ticket/7586#comment:6 https://svn.boost.org/trac10/ticket/7586#comment:6 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.56.0</span> → <span class="trac-field-new">Boost 1.57.0</span> </li> </ul> Ticket viboes Fri, 05 Sep 2014 06:11:32 GMT milestone deleted https://svn.boost.org/trac10/ticket/7586#comment:7 https://svn.boost.org/trac10/ticket/7586#comment:7 <ul> <li><strong>milestone</strong> <span class="trac-field-deleted">Boost 1.57.0</span> </li> </ul> Ticket