← Back to context

Comment by amelius

6 hours ago

> context switching behavior is OS dependent and your average general purpose kernel is not cooperative.

True, but if all you are using is async, then you're basically back at Windows 3.1 cooperative multitasking, except now within a Rust program.

Tokio uses a thread pool with work stealing so it is definitely more advanced than Windows 3.1's model!

As other commenters have pointed out, cooperative multitasking is actually a great fit for I/O bound code.