3 ms·
That’s true in JS but less so in a language like Rust where there are threading implications.
by afavour 3y ago
That’s true in JS but less so in a language like Rust where there are threading implications.
- jayd16 3y agoI'm not as familiar with Rusts's implementation but even in C# it's mostly true. Threads are only hit when a callback is not directly awaited. There's more to it but it starts you down the right path, I think.
- littlestymaar 3y agoThere are no threading implications to async in Rust. The executor you're using may add some requirements on your futures because it wants to run them on multiple threads[1], but that's not related to async itself, and you can always use a single threaded executor if you don't want these limitations (and they doesn't apply to embeded anyway). [1] namely, your futures will need to be Send + 'static.