Subj : Re: Question : usage of conditional variables. To : comp.programming.threads From : Jamie Date : Thu Jun 09 2005 03:39 am Thanks David! Yeh, I had wrong understanding with condition variables, still complicated. Aftter I put the predicate (ready : TRUE/FALSE), my program runs well. But, what is this predicate for? A site said that "pthread_cond_wait() is recommended to be used in a loop testing the predicate associated with it. This will take care of any spurious wakeups that may occur." My program runs well for a while without predicate(not using a loop), but it stops and wait a signal forever at some point.. After adding a predicate and checking it before calling pthread_cond_wait(), it runs well. But I can't understand why sometimes it works well without predicate and sometimes not.. What does the spurious wakeups really mean? I'm still confused about it.. .