id summary reporter owner description type status milestone component version severity resolution keywords cc 11174 boost::condition_variable::timed_wait with predicate unexpectedly wakes up while should wait infinite zac.sims@… viboes "This is a follow on from the closed bug #9708. boost::condition_variable::timed_wait(..., boost::posix_time::time_duration(boost::posix_time::pos_infin), predicate_type pred) always immediately returns false. The referenced bug suggests this worked in 1.44. A fix for the non-predicate overload was merged for 1.56 but this wasn't applied for the other overloads of timed_wait. The current workaround we have is: {{{ bool timeoutReached = false; if(timeToWait.is_pos_infinity()) { waitHandle.wait(lock, boost::bind(&ObjectPool::IsResourceReady, this, boost::ref(waitHandle))); } else { // timed_wait returns false if the timeout was reached timeoutReached = !waitHandle.timed_wait(lock, timeToWait, boost::bind(&ObjectPool::IsResourceReady, this, boost::ref(waitHandle))); } if (timeoutReached) { // handle timeout } }}} " Bugs closed Boost 1.60.0 thread Boost 1.57.0 Regression fixed