3 ms·
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
by mratsim 6y ago
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/1wAaf1rYoM4S4gtnPh0zOlGzWtrZFQ5suE8qr2sD8uWQ/pub https://docs.google.com/document/d/1wAaf1rYoM4S4gtnPh0zOlGzW...
- Rust: https://mail.mozilla.org/pipermail/rust-dev/2013-November/006314.html 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/p1364r0.pdf http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p136...