3 ms·
No mention of non-blocking IO or a concurrency model that isn't 1:1 with OS threads. What's the plan on those fronts if they won't be in 1.0?
by 15155 11y ago
No mention of non-blocking IO or a concurrency model that isn't 1:1 with OS threads.
What's the plan on those fronts if they won't be in 1.0?
- steveklabnik 11y agoThat they'll be coming in later releases. IO is a library concern in Rust, not a language concern. There are already crates that offer some of this, like mio.
- tormeh 11y ago>x is a library concern in y, not a language concern. The end user doesn't really care. The line between the standard library and the language is usually invisible.
- 15155 11y ago> IO is a library concern in Rust, not a language concern. It often is a language concern: no async/await in the compiler or language-assisted yielding/scheduling means difficult or impossible concurrency model. With Rust's borrow checker, IO (already unsafe C FFI) + callbacks are hard to write in a pleasing and safe way.
- lambda 11y agoYou're right, that site should be updated with those as other parts of the ecosystem that aren't yet mature. There's work on non-blocking IO at https://github.com/carllerche/mio https://github.com/carllerche/mio, which is looking like one of the more promising approaches, as well as https://github.com/carllerche/eventual https://github.com/carllerche/eventual which provides higher-level abstractions over it. There has been some discussion of adding some language support for something like async/await/yield from other languages, but nothing concrete in the near future on the language front. So, there's usable third-party libraries for it (at least, if you're on a Unix like platform), language support is in the realm of "it would be nice someday".