3 ms·
I most runtimes you can just call something like `block_on`. There are some things to be careful about to avoid starving other takes but most general-purpose ru
by kevincox 3y ago
I most runtimes you can just call something like `block_on`. There are some things to be careful about to avoid starving other takes but most general-purpose runtimes will spawn more threads as needed. Similarly blocking in an asynx task is generally not much of an issue for these runtimes for the same reasons.
It isn't like JavaScript where there is truly only one thread of execution at a time and blocking it will block everything.