13 Aug
2010
13 Aug
'10
7:39 a.m.
On 12/08/10 18:44, ghazel@gmail.com wrote:
why not just use threads?
One reason not to use threads is that they're fairly heavyweight. They use OS resources, and each one needs its own C stack that has to be big enough for everything it might want to do. Switching between threads can be slow, too. In an application that requires thousands of small, cooperating processes, threads are not a good solution. And applications like that do exist -- discrete-event simulation is one example. -- Greg