22 ms·
https://news.ycombinator.com/item?id=6198068 https://news.ycombinator.com/item?id=6198068 Haskell allows you to run "green" or userspace threads in the million
by gtani 13y ago
https://news.ycombinator.com/item?id=6198068 https://news.ycombinator.com/item?id=6198068
Haskell allows you to run "green" or userspace threads in the millions, similar to what erlang and scala (akka) provide (and F#), with dispatcher designed to run i nthose numbers. So it's something like Celluloid, but I don't know how many people have used celluloid in production, in haskell the runtime's been well documented (Simon Marlow's oreilly book) and tested in heavily loaded systems.
- FreeFull 13y agoDo note that the changes described in the paper to allow green threads in the millions won't hit GHC until version 7.8.1 is released.
- enigmo 13y agoYou can use millions of threads in versions <7.8.1 as well, they'll just run a lot slower if they're all actively doing IO.
- vidarh 13y agoI just ran a small test that started and ran one million green threads on Ruby 1.8.7, and it worked just fine. I won't make any claims about the performance, but it certainly works. 1.9+ supports both green threads (fibers) and system/kernel threads, and would be much better to test. MRI is slow regardless, so unless you're bound by extremely slow IO from other components, you're going to run into other limits long before you reach those kind of numbers, though.