Boost C++ Libraries: Ticket #5833: once.cpp: call_onces swallows errors from CreateMutexA and WaitForSingleObject https://svn.boost.org/trac10/ticket/5833 <p> Index: once.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/thread/src/once.cpp,v retrieving revision 1.27 diff -<a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">r1</a>.27 once.cpp 157c157 &lt; HANDLE mutex = CreateMutexA(NULL, FALSE, strm.str().c_str()); --- </p> <blockquote class="citation"> <blockquote> <p> HANDLE mutex = CreateMutexA(NULL, FALSE, strm.str().c_str()); </p> </blockquote> </blockquote> <p> 160a161,162 </p> <blockquote class="citation"> <blockquote> <p> if(mutex == NULL) </p> <blockquote> <p> throw std::runtime_error("Failed to create one-time mutex"); </p> </blockquote> </blockquote> </blockquote> <p> 162,164c164,166 &lt; int res = 0; &lt; res = <a class="missing wiki">WaitForSingleObject</a>(mutex, INFINITE); &lt; assert(res == WAIT_OBJECT_0); --- </p> <blockquote class="citation"> <blockquote> <p> int wait1 = WAIT_OBJECT_0, res = 0; wait1 = <a class="missing wiki">WaitForSingleObject</a>(mutex, INFINITE); assert(wait1 == WAIT_OBJECT_0); </p> </blockquote> </blockquote> <p> 186a189,191 </p> <blockquote class="citation"> <p> </p> <blockquote> <p> if(wait1 != WAIT_OBJECT_0) </p> <blockquote> <p> throw std::runtime_error("Failed to wait on mutex"); </p> </blockquote> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5833 Trac 1.4.3 Jeffrey Walton <noloader@…> Wed, 31 Aug 2011 00:40:14 GMT component changed; cc, owner set https://svn.boost.org/trac10/ticket/5833#comment:1 https://svn.boost.org/trac10/ticket/5833#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">noloader@…</span> added </li> <li><strong>owner</strong> set to <span class="trac-author">Anthony Williams</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">thread</span> </li> </ul> <p> <code>assert(res == WAIT_OBJECT_0)</code> might be too tight - <code> assert(res == WAIT_OBJECT_0 || res == WAIT_ABANDONED_0)</code> might be a better choice. </p> Ticket viboes Fri, 02 Dec 2011 23:36:13 GMT cc, owner, status changed https://svn.boost.org/trac10/ticket/5833#comment:2 https://svn.boost.org/trac10/ticket/5833#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> added </li> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Please, could you use the code block so that the proposed pathc is readable, or just explain the problem and attach the patch? </p> Ticket viboes Fri, 09 Dec 2011 11:18:04 GMT <link>https://svn.boost.org/trac10/ticket/5833#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5833#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/5833#comment:2" title="Comment 2">viboes</a>: </p> <blockquote class="citation"> <p> Please, could you use the code block so that the proposed pathc is readable, or just explain the problem and attach the patch? </p> </blockquote> <p> Forget this comment please. The text is readable. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 10 Dec 2011 14:07:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5833#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5833#comment:4</guid> <description> <p> Where is libs/thread/src/once.cpp? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 10 Dec 2011 15:15:57 GMT</pubDate> <title>cc, type changed https://svn.boost.org/trac10/ticket/5833#comment:5 https://svn.boost.org/trac10/ticket/5833#comment:5 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> removed </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> </ul> <p> Moved to support request until concerned file clarified. </p> Ticket viboes Thu, 29 Dec 2011 10:38:27 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5833#comment:6 https://svn.boost.org/trac10/ticket/5833#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Closed as it seems this doesn't corresponds to the current Boost.Thread implementation. </p> Ticket