id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12519,boost::thread::try_join_for does not return after timeout,mweb@…,viboes,"If we use BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC try_join_for does not abort after the given timeout anymore. If I remove the define it works again. We use the define to be able to use sleep_for while changing the system time. (See #6787) To Reproduce: {{{ #define BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC #include #include void test_func() { boost::this_thread::sleep_for(boost::chrono::milliseconds(1500)); } int main() { boost::thread t(test_func); if (!t.try_join_for(boost::chrono::milliseconds(50))) { std::cout << ""OK"" << std::endl; } else { std::cout << ""FAILED"" << std::endl; } if (t.try_join_for(boost::chrono::milliseconds(2000))) { std::cout << ""OK"" << std::endl; } else { std::cout << ""FAILED"" << std::endl; } } }}} If the define is available the first try_join_for waits till the thread is finished, the expected behavior would be that the first try_join_for would return before the thread is finished.",Patches,closed,Boost 1.65.0,thread,Boost 1.61.0,Problem,fixed,,