[Boost-bugs] [Boost C++ Libraries] #5838: thread.cpp: thread::join swallows errors from WaitForSingleObject

Subject: [Boost-bugs] [Boost C++ Libraries] #5838: thread.cpp: thread::join swallows errors from WaitForSingleObject
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-08-30 06:26:41


#5838: thread.cpp: thread::join swallows errors from WaitForSingleObject
--------------------------------+-------------------------------------------
 Reporter: noloader@… | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
--------------------------------+-------------------------------------------
 Index: thread.cpp
 ===================================================================
 RCS file: /cvsroot/boost/boost/libs/thread/src/thread.cpp,v
 retrieving revision 1.25
 diff -r1.25 thread.cpp
 234c234
 < int res = 0;
 ---
> int wait1 = WAIT_OBJECT_0, res = 0;
 236,237c236,237
 < res = WaitForSingleObject(reinterpret_cast<HANDLE>(m_thread),
 INFINITE);
 < assert(res == WAIT_OBJECT_0);
 ---
> wait1 = WaitForSingleObject(reinterpret_cast<HANDLE>(m_thread),
 INFINITE);
> assert(wait1 == WAIT_OBJECT_0);
 250a251,253
>
> if(wait1 != WAIT_OBJECT_0)
> throw std::runtime_error("Failed to wait on thread");

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