Subj : Re: pthread_create and memory To : comp.programming.threads From : David Schwartz Date : Sat Mar 12 2005 06:03 pm "David Hopwood" wrote in message news:sfLYd.50984$Bk7.47316@fe1.news.blueyonder.co.uk... >> And the fact that you don't have a few thousand processors. > > That's beside the point. Threads are primarily for expressing concurrent > program structure. Use of hardware parallelism is a bonus. No, tasks are primarily for expressing concurrent program structure. Threads are for keeping CPUs busy or performing asynchronous I/O. Threads are how you get the work done, not how describe the work. You should not have more threads than tasks you can usefully do at the same time, and the number of things you can usefully do at the same time is how many processors you have plus how many I/Os you can usefully pend. On typical machines, this is far less than 100. DS .