News for hackers. Stuff that matters.
Re:Tokio Console by lilyball on Saturday December 18, 2021 @02:57AM (#29602674)
> rust decided not to go down the route of implementing user space threads

Rust had (optional) user-space threads a long time ago, but that was removed in the pre-1.0 days as it added a lot of complexity and had some unavoidable performance loss even when opting for native threads (it forced dynamic dispatch on anything related to threading or I/O). There was a lot of discussion here but eventually it was declared that the OS thread scheduler was in fact perfectly capable of handling large numbers of threads and that virtual memory mapping meant the stack space allocation for each thread wasn’t a big deal and so green threads were removed.

There are no comments on this comment yet.