3 ms·
My understanding is that most of Rust's standard library translates to the same blocking calls on Linux, so it would be plagued with the same issues as C would
by deathanatos 8y ago
My understanding is that most of Rust's standard library translates to the same blocking calls on Linux, so it would be plagued with the same issues as C would be. (And the solution reached in the article would similarly work in Rust.)
There are certainly async I/O libraries for Rust (e.g., Tokio), but those are going to be limited by the primitives the OS gives them. (AFAIK, Tokio's core libraries don't directly do async disk I/O; there is tokio-fs, and it does it by shunting the work to a threadpool.) The fact that disk I/O is so uniquely special on Linux effects any language, as it is an aspect of the kernel itself.
I love Rust, and while there are a ton of compelling reasons to use it, I don't think it's fair to say it would have prevented this from happening, in this particular case.