| ▲ | nextaccountic 2 days ago | |
with cooperative scheduling, yes. This is indeed something missing from the Rust async ecosystem, tasks are meant to be IO-bound and if they become CPU-bound accidentally they will starve other tasks (async-std tried to fix this, but had some backlash due to overhead IIRC). Go actually puts a yield on every loop body (or used to), to prevent starvation. A 10ms thing will have negligible impact Also: yielding to the kernel is very costly. Yielding to another task in your own thread is practically free in comparison | ||