id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4078,interrupt()ion of threads in timed_wait() of a condition variable has unexpected side effects,Sebastian Kienzl ,Anthony Williams,"If multiple threads are waiting on a condition variable with timed_wait() then interrupt()ing one them makes timed_wait() return {{{true}}} in another thread. Happens under Linux, not tested under Windows. I haven't tested it with version later than 1.39.0 but couldn't find a ticket reporting that bug or any mention of it in the changelog. {{{ #include #include #include #include using namespace std; using namespace boost; condition_variable cv; mutex mut; void test_thread( const char* name ) { try { mutex::scoped_lock lock( mut ); cout << name << "" timed_wait: "" << cv.timed_wait( lock, posix_time::time_duration( 0, 20, 0 ) ) << endl; } catch( thread_interrupted& ) { cout << name << "" interrupted"" << endl; } } int main() { thread thread1( test_thread, ""1"" ); thread thread2( test_thread, ""2"" ); sleep( 1 ); cout << ""intr 1"" << endl; thread1.interrupt(); sleep( 1 ); cout << ""intr 2"" << endl; thread2.interrupt(); sleep( 1 ); thread1.join(); thread2.join(); return 0; } }}} ",Bugs,closed,Boost 1.43.0,thread,Boost 1.39.0,Problem,invalid,,