Opened 11 years ago

Closed 11 years ago

#5838 closed Support Requests (invalid)

thread.cpp: thread::join swallows errors from WaitForSingleObject

Reported by: noloader@… Owned by: viboes
Milestone: To Be Determined Component: thread
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: noloader@…, viboes

Description

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");

Change History (3)

comment:1 by Jeffrey Walton <noloader@…>, 11 years ago

Cc: noloader@… added
Component: Nonethread
Owner: set to Anthony Williams

assert(res == WAIT_OBJECT_0) might be too tight - assert(res == WAIT_OBJECT_0 || res == WAIT_ABANDONED_0) might be a better choice.

comment:2 by viboes, 11 years ago

Cc: viboes added
Owner: changed from Anthony Williams to viboes
Status: newassigned
Type: BugsSupport Requests

Sorry, I don't see any file libs/thread/src/thread.cpp. Moved to support request until concerned file clarified.

comment:3 by viboes, 11 years ago

Resolution: invalid
Status: assignedclosed

Closed as it seems this doesn't corresponds to the current Boost.Thread implementation.

Note: See TracTickets for help on using tickets.