Great explanation by @LarsWirzenius on the why
Async code in Rust runs in one or more threads. Usually thereโs a small number of threads that are multiplexed between different async functions. The async executor chooses what threads to use and which thread runs which async code. If the async code takes a long time, such as by calling std::thread::sleep, the whole thread stops doing anything else, and then no other async code runs in that thread, either.
๐ Workflow runs ๐ Branch on GitHub
Great explanation by @LarsWirzenius on the why
Async code in Rust runs in one or more threads. Usually thereโs a small number of threads that are multiplexed between different async functions. The async executor chooses what threads to use and which thread runs which async code. If the async code takes a long time, such as by calling std::thread::sleep, the whole thread stops doing anything else, and then no other async code runs in that thread, either.
๐ Workflow runs ๐ Branch on GitHub