3 ms·
> If code is blocking for long periods of time, it shouldn't be running on the async worker thread in the first place. Marking such a function `async` would be
by lmm 5y ago
> If code is blocking for long periods of time, it shouldn't be running on the async worker thread in the first place. Marking such a function `async` would be wrong.
Right, you need to go right down and e.g. use a non-blocking I/O primitive instead of a blocking I/O primitive. Rust gives you no way to polymorphically do one or the other.