Skip Navigation

Reasoning About Async Rust with State Machines

Reasoning About Async Rust with State Machines

Build the state machine behind an async fn, then use that model to reason about common async bugs and compiler errors.

Tutorial Link

Async Rust can be frustrating because the compiler errors feel disconnected from your intent, so you try to fix things without understanding why.

Even working code can hang or run out of order at runtime, with no obvious place to begin debugging.

This chapter guides you to build the state machine behind an async fn by hand, then uses that as a model to reason about common async bugs and compiler errors.

Please let me know in comments if my async series is helpful or not.

Comments

0