News for hackers. Stuff that matters.
Re:The future of M:N threading by klodolph on Wednesday November 13, 2013 @12:38PM (#6726832)
No, they're saying the performance will be slightly degraded. But you can already spin up thousands of threads on Linux without performance problems.

The M:N model is notoriously difficult, making your threading system 10x as complicated usually isn't worth the 10% performance increase. Haskell is, again, the exception that proves the rule. In Haskell there is no stack and no need for TLS, so the complexity of M:N threading is much lower. Additionally, on Haskell there is a provision for pinning green threads to OS threads if you need interoperability with foreign code that can't get moved across threads as easily, and the assumption is that you usually don't need to pin threads.

I'd also like to point out that for some applications, using native threads instead of green threads will reduce the number of context switches, it's when threads are CPU bound that green threads give you the biggest performance boost.

Re:The future of M:N threading by pcwalton on Wednesday November 13, 2013 @03:56PM (#6728433)
> Additionally, on Haskell there is a provision for pinning green threads to OS threads if you need interoperability with foreign code that can't get moved across threads as easily, and the assumption is that you usually don't need to pin threads.

You can do that in Rust too (and we do it a lot).