Subj : Re: thread control by mutex, predicates and conditions puzzle To : comp.programming.threads From : Joseph Seigh Date : Fri Jan 07 2005 02:05 pm On 7 Jan 2005 10:15:32 -0800, Jomu wrote: > There are signals which will get you out of pthread_cond_wait, probably > all (I can't recall any exceptions). Your thread waiting on condition > will get EINTR as result of pthread_cond_wait and there you can handle > situtation. Of course, signal itself is supposed to be handled in it's > handler and after getting EINTR it is up to your thread to lookup state > changed by that handler. Most implementations will handle EINTR as a spurious wakeup but you cannot depend on that behavior. The implementation is allowed to go back into wait. -- Joe Seigh .