3 ms·
Heterogeneous selects are just not possible to do in a cross-platform manner, without async/await. Rust is one of the very few environments which lets you do th
by sunshowers 2y ago
Heterogeneous selects are just not possible to do in a cross-platform manner, without async/await. Rust is one of the very few environments which lets you do them in a reasonable manner -- the other alternatives are a nest of threads or a hand-written message loop-based state machine, both of which don't scale well as complexity goes up.
- worik 2y agohttps://crates.io/crates/mio https://crates.io/crates/mio
- sunshowers 2y agoRight, which (if you use it without Tokio) means you're managing a message loop by hand. Doesn't quite scale up to state machines with 50+ states.
- worik 2y ago> Doesn't quite scale up to state machines with 50+ states. It is a lot of lines of code, but simple. It is the easy thing.