3 ms·
> There reaches a point where threads are much less free than events. Why? > Newer concurrency systems will handle thousands or millions of lightweight proces
by jamesaguilar 16y ago
> There reaches a point where threads are much less free than events.
Why?
> Newer concurrency systems will handle thousands or millions of lightweight processes without firing up large numbers of native threads, and there's a reason for that design decision.
I would say that is based on the historically accurate but currently false notion that OS threads are expensive to start up or keep idle.
- wladimir 16y agoIt's still true -- I recommend looking at some comparisons. Worker-thread based http servers consistently have worse performance at handling a large number of connections, and the error rate for those (simply) using threads is also higher at large number of connections, For example, see this benchmark of Python web servers: http://nichol.as/benchmark-of-python-web-servers http://nichol.as/benchmark-of-python-web-servers