Subj : Re: problem in pthread_setconcurrency macro To : comp.programming.threads From : David Schwartz Date : Mon Feb 28 2005 12:16 pm "Mozis" wrote in message news:1109530835.263646.164530@l41g2000cwc.googlegroups.com... >u r absolutely right, but what should I do if I want to force it > working out in 10 threads. Infact, it is also given in the book of > richard stevens that this behaviour is by default and to override that > v hav to use pthread_setconcurrency() explicitely & thats y I used it > but went in vain. > Please let me kno if u have some more thaughts on it & thanx for > response. You are thinking about threads the wrong way. Threads are not about forcing things to happen at the same time, threads are about *allowing* things to happen the same time. That way, if things happening at the same time happens to be more efficient, you get the efficiency boost. See what happens if one thread gets busy, for example, by waiting for data to be read from disk. Then it will be more efficient if another thread runs. You can, if you really want to, force concurrency even when it's not efficient, but why would you want to do that? DS .