News for hackers. Stuff that matters.
Re:Tokio 1.0 – async runtime for Rust by pizza234 on Wednesday December 23, 2020 @04:07PM (#25522238)
AFAIK, the major component is the scheduler.

Rust can't really implement green threading (imagine Golang) by default, because it requires the runtime to be bundled in the executable, and the code to be compiled in a specific way to be managed by the scheduler.

I actually find amusing the thought that _this_ is systems programming. In a low level language one can implement the functionality of a higher level language (ie. Golang), but not the reverse :-)

Re:Tokio 1.0 – async runtime for Rust by mratsim on Thursday December 24, 2020 @11:11AM (#25528690)
Both Rust and Go used to have green threads i.e. stackful coroutines / fibers that installed their own execution stack and switched to it.

However everyone who ever did green threads ended up having a lot of difficulties with stack optimization: - Go: https://docs.google.com/document/d/1wAaf1rYoM4S4gtnPh0zOlGzW... - Rust: https://mail.mozilla.org/pipermail/rust-dev/2013-November/00... - Same for Java in the past.

Now only Go is left.

More on fibers woes from the C++ point of view: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p136...