Advantages of a large number of threads cf other approaches?

jonathan@REDACTED jonathan@REDACTED
Mon Feb 16 17:00:40 CET 2004

I was discussing Erlang with a colleague and little difficulty 
convincing him either that its CSP approach was superior to trying to 
manage a large number of threads using semaphores, or that Erlangs VM 
threads scale better than antive threads on the OS's we're familiar 
with. What I had a harder time doing was convincing him that using a 
large number of threads was a best solution for any of the major 
cases we discussed:

* Internet servers - why not use asynchronous sockets running in a 
single thread?

* Simulations - why use an object per thread rather than a "classic" 
OO approach?

One answer is that CSP threads (at least in the first case) lead to a 
simpler design and that Erlang itself has a host of features that 
support highly reliable programs. But I'd appreciate suggestions 
regarding other benefits, especially those arising from CSP itself.

- Jonathan

More information about the erlang-questions mailing list