3 ms·
There's still room for improvement in both of them, too. If you want to have a lot of connections open, you have to choose between lots of threads with blocking
by pjscott 15y ago
There's still room for improvement in both of them, too. If you want to have a lot of connections open, you have to choose between lots of threads with blocking I/O, or using event-driven I/O, or using some kind of magical light-weight cooperatively multitasked greenlet/fiber thing.
As Erlang and Haskell show, it's totally possible to combine an event-driven I/O subsystem with lightweight user-space preemptive multithreading that supports a huge number of threads, takes advantage of multiple cores, and doesn't need to worry about blocking-vs-nonblocking magic. I would love to see that in a more mainstream language.
- anacrolix 15y agoI agree. Concurrency is a huge problem with mainstream languages.