3 ms·
> Also, goroutines, which are lightweight but preeemptable, avoid the problems of "async", where you have to be very careful about not being compute-bound for t
by zozbot234 5y ago
> Also, goroutines, which are lightweight but preeemptable, avoid the problems of "async", where you have to be very careful about not being compute-bound for too long.
You know what else is lightweight and preemptable? Threads. Yes, really. Unless you're on weird platforms like Windows, you can just use threads.
> making "async" mandatory in libraries
AIUI, Rust includes a simple `block_on()` feature so that you can use any async library in a sync context. The old "function color" issue is greatly mitigated in Rust.