3ec Subj : Re: Futexes are wrong! (Are they?) To : comp.programming.threads From : David Schwartz Date : Mon Jun 06 2005 11:56 pm "Jomu" wrote in message news:1118039318.477830.114510@g43g2000cwa.googlegroups.com... > Been thinking about former Joe Seigh posts... As consumer-producer > message queues are (for me, probably elsewhere also) most frequent sync > devices, and their problem with preemptive signaling happens mostly > (maybe only) when one thread signals while holding mutex (same one > waiting thread will try to reacquire when signaled) then why don't > rearrange signaling so that it happens after mutex is freed? Generally, you get better performance if you signal after the mutex is freed. This should be used except in the very rare cases where it creates a problem. FWIW, in my many years of multi-threaded programming, I have never encountered such a case and have only come close to deliberately constructing one. DS . 0