5 ms·
I think they are pointing out that because the Rust design has decoupled the functionality from the implementation, these kind of replacements are even possible
by estebank 4y ago
I think they are pointing out that because the Rust design has decoupled the functionality from the implementation, these kind of replacements are even possible in the first place.
Of course, if you use an alternative executor there are large swaths of the (non-std) async ecosystem that are not available to you (thinking of anything like relying on a tokio::timer::Delay as an example). But as you point out Rust in the Linux kernel already doesn't rely on the std, so they wouldn't even begin to imagine to use an off the shelf crate and expect it to work unmodified for their use case. I just think it is worth pointing out that this is a constraint we currently have.
- davidatbu 4y agoYou're better at expressing my thoughts than I am :)
- littlestymaar 4y agoestebank reads other people's mind, that's why he's so good at writing helpful compiler errors.
- estebank 4y agoThank you, you're too kind. I don't know how much that experience of "make the compiler try to talk to a human in a way they can understand it" translates to other parts of life, though :)
- JoshTriplett 4y agoRight, yes: if we had a design that built a single executor into the language or we had a runtime that included it, you wouldn't be able to replace that as easily. Because executors are, at most, a library mechanism, you can always replace them or run more than one.