Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Rust did have green threading (user threads and goroutines) runtime back before the v1.0 stabilization but they removed it to make the language applicable to a broader range of problems.
Rust’s async design allows for async to be used on a variety of hardware types, like embedded. Green threads/fibers are much more useful for managed languages like Go and Java that don’t typically have to run without an operating system or without a memory allocator. Of course C++ can do this also, with their new coroutines/generators feature but I don’t think it’s very controversial to say that it is much harder to use than Rust’s async.
Go's solution is for the scheduler to notice after a while when a goroutine has blocked execution and to shift goroutines waiting their turn to another thread. async-std pondered a similar approach with tasks, but it proved controversial and was never merged.