Boost C++ Libraries: Ticket #5838: thread.cpp: thread::join swallows errors from WaitForSingleObject https://svn.boost.org/trac10/ticket/5838 <p> Index: thread.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/thread/src/thread.cpp,v retrieving revision 1.25 diff -<a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">r1</a>.25 thread.cpp 234c234 &lt; int res = 0; --- </p> <blockquote class="citation"> <blockquote> <p> int wait1 = WAIT_OBJECT_0, res = 0; </p> </blockquote> </blockquote> <p> 236,237c236,237 &lt; res = <a class="missing wiki">WaitForSingleObject</a>(reinterpret_cast&lt;HANDLE&gt;(m_thread), INFINITE); &lt; assert(res == WAIT_OBJECT_0); --- </p> <blockquote class="citation"> <blockquote> <p> wait1 = <a class="missing wiki">WaitForSingleObject</a>(reinterpret_cast&lt;HANDLE&gt;(m_thread), INFINITE); assert(wait1 == WAIT_OBJECT_0); </p> </blockquote> </blockquote> <p> 250a251,253 </p> <blockquote class="citation"> <p> </p> <blockquote> <p> if(wait1 != WAIT_OBJECT_0) </p> <blockquote> <p> throw std::runtime_error("Failed to wait on thread"); </p> </blockquote> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5838 Trac 1.4.3 Jeffrey Walton <noloader@…> Wed, 31 Aug 2011 00:43:59 GMT component changed; cc, owner set https://svn.boost.org/trac10/ticket/5838#comment:1 https://svn.boost.org/trac10/ticket/5838#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 Sat, 10 Dec 2011 15:26:37 GMT cc, owner, status, type changed https://svn.boost.org/trac10/ticket/5838#comment:2 https://svn.boost.org/trac10/ticket/5838#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> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> </ul> <p> Sorry, I don't see any file libs/thread/src/thread.cpp. Moved to support request until concerned file clarified. </p> Ticket viboes Thu, 29 Dec 2011 10:36:43 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5838#comment:3 https://svn.boost.org/trac10/ticket/5838#comment:3 <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