Life of an async fn
summary
Compiler turns async fn into an impl Future state machine by desugaring into a looped poll that walks a MIR control‑flow graph, overlaps local storage like an enum‑style state slot, and avoids extra heap allocation. Real results: large nested futures once consumed half a megabyte on Fuchsia and, after overlap optimisations, some shrink by 80–90%. Watch for concrete pitfalls: holding context across await and embedding big temporaries.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 2:32Handle Requests
- 12:33Overlap
- 16:53Performance
- 20:16Big Expressions
- 23:37Should you use it
- 24:13C proposal
- 26:01Applications
- 27:09Contributing








