Subj : Re: why my threads do not wake up To : comp.programming.threads From : David Schwartz Date : Tue Aug 23 2005 06:45 pm "Jingbo" wrote in message news:1124841839.830586.66060@g44g2000cwa.googlegroups.com... >I think it is Solaris problem. I don't believe you. > After start up, the program only occupy 3 CPU's. But after I apply > "pstack" command to the process for 3 times, it can use all the 8 CPU's > on the machine. What a trick! That's not surprising. Attaching to a process may cause spurious wakeups which can help a buggy program that deadlocked because it called pthread_cond_wait when it should not have. > I do not blame you if you do not believe it :) Believe what? That kicking a broken program can temporarily fix it? Yes, I believe that. Now fix the bug and don't call pthread_cond_wait when you don't want to wait. DS .