Subject: [Boost-bugs] [Boost C++ Libraries] #8924: boost/thread/win32/basic_timed_mutex.hpp: Ignores failures from WaitForSingleObject
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-25 05:51:54
#8924: boost/thread/win32/basic_timed_mutex.hpp: Ignores failures from
WaitForSingleObject
-------------------------------------------------+-------------------------
Reporter: Jeffrey Walton <noloader@â¦> | Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.54.0 | Severity: Problem
Keywords: synchronization WaitForSingleObject |
API failure |
-------------------------------------------------+-------------------------
boost/thread/win32/basic_timed_mutex.hpp ignores failures from
WaitForSingleObject. There's not much point in looping if its just going
to fail again:
do
{
unsigned const retval(win32::WaitForSingleObject(sem,
::boost::detail::win32::infinite));
BOOST_VERIFY(0 == retval || ::boost::detail::win32::wait_abandoned ==
retval);
clear_waiting_and_try_lock(old_count);
lock_acquired=!(old_count&lock_flag_value);
}
while(!lock_acquired);
The use of BOOST_VERIFY is good, but I'm not sure about the
WAIT_ABANDONED. WAIT_ABANDONED usually indicates a bigger problem, and
continuing might not be a good idea.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8924> 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:13 UTC