Skip to content

Comment on Who Runs Your Rust Future? Hands-On Intro to Async Rustparent

Comments

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.