5 ms·
You can have a single threaded event loop in Rust. Just, like everything else, it's an option and you have to specify it explicitly.
by armchairhacker 4y ago
You can have a single threaded event loop in Rust. Just, like everything else, it's an option and you have to specify it explicitly.
- moonchrome 4y agoYes but the API has to be built for multithreaded scheduling.
- staticassertion 4y agoNo, you get !Send futures.
- Gwypaas 4y agoThis is a nice read on why you likely should prefer a single threaded runtime and enable parallelism through other means. Or decide to pay the synchronization cost. https://maciej.codes/2022-06-09-local-async.html https://maciej.codes/2022-06-09-local-async.html
- dagmx 4y agoYes but the point was that rust has to allow for multi threaded event loops. JavaScript can design around knowing that's not an option