On 12/08/10 18:44, firstname.lastname@example.org 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.