id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2330,thread::interrupt() can be lost if condition_variable::wait() in progress,Don Ward ,Anthony Williams,"In the pthread implementation of thread, if thread::interrupt() calls pthread_cond_broadcast() after condition_variable::wait() has checked for interrupt_requested and set current_cond but before it has called pthread_cond_wait(), the the cond_broadcast will be ignored and the wait will never terminate. I have observed this behavior under Cygwin (with Windows XP/SP3). In my application it causes the program to hang in the join of the waiting thread. I think that thread::interrupt() must own the mutex associated with current_cond when pthread_cond_broadcast() is called. (Note that if thread_info->data_mutex is owned when the current_cond mutex is acquired then deadlock can occur.) I have attached a patch that demonstrates a fix for the problem. The patch looks good to me and works for my application but has not been otherwise tested. My application (based on the GNU Radio trunk code - http://gnuradio.org/trac) is large and not easily simplified, but I think that the potential for losing the thread::interrupt notification is apparent in the code. I would be happy to test proposed fixes on my application; creating a simple example to demonstrate the problem would be more difficult for me (I don't have experience programming with boost), but I will work on it if needed.",Patches,closed,,thread,Boost 1.41.0,Showstopper,fixed,,don2387ward@…