Subj : Re: Study Material for Multi-threaded application developement in UNIX/LINUX To : comp.programming.threads From : David Schwartz Date : Thu May 26 2005 09:25 pm "Arash Partow" wrote in message news:1117153719.637051.87390@g14g2000cwa.googlegroups.com... > The reason for the loop and such... is because signal and broadcast > are two different waking mechanisms. In the pthreads standard > broadcast wakes every waiting thread on the condition where as signal > wakes the thread that as been waiting the longest or in other words > was the first to call wait on that condition - aka first in queue. Actually, the signal wakes the thread with the highest priority. If there is more than one thread at the highest priority, which thread woken is unspecified. Optimally, it would be the thread that has waited the *least* as that thread is most likely to be hot in the caches. DS .