Subj : Re: why my threads do not wake up To : comp.programming.threads From : David Schwartz Date : Wed Aug 24 2005 06:40 pm "Jingbo" wrote in message news:1124929139.894122.292650@o13g2000cwo.googlegroups.com... > OK, here is a program to demostrate the problem. > Compile with: CC -mt ttt.C -lpthread > After I ran it, only one thread is on CPU. After several times of > running "pstack" command, all 8 threads is running. Your program is only guaranteed to make forward progress, not to make forward progress at the maximum possible rate. You could create your threads with system contention scope or call pthread_set_concurrency. (Or use a more realistic mix of computation and I/O.) DS .