Subj : Re: problem in pthread_setconcurrency macro To : comp.programming.threads From : David Schwartz Date : Sat Feb 26 2005 01:32 pm "Mozis" wrote in message news:1109444806.412707.212560@o13g2000cwo.googlegroups.com... >I set the councurrency level 10 by pthread_setconcurrency(10) and > started 10 threads to accomplish some task but the result showed that > It was performed by the 1st thread only and others just exited blankly. > It means others except the 1st thread didnt get the CPU. > But, I dont kno what went wrong though I used the > pthread_setconcurrency() function...I am usin kernel v2.4.21.8 on INTEL > p4 with RHEL OS. I had also added lpthread library while compiling. If you don't force any particular order, you will generallyget whatever order happens to be the most efficient, to the extent the implementation is able to determine this. If you only have one CPU, the platform will generally try to minimize thread switches because this has a penalty due to caching. Nothing is wrong. The behavior you got is likely the most efficient. DS .