Reasoning with Async Rust
summary
A runnable toy — cracking eggs, frying eggs and bacon — uses async, await, join, select to show concrete interleavings, then adds a shared spoon and pan to demonstrate a reproducible deadlock and a high‑frequency livelock that heating the CPU without progress. The slide‑level fix of combining mutexes trades concurrency for safety; an implemented actor model using channels keeps pan and spoon private and works reliably. The claim: async makes reasoning about timelines easier but does not replace redesign or testing.
AI-written summary · about
chapters (19)
- 0:00Concurrency bugs intro
- 2:13What is concurrency
- 3:38Sync breakfast example
- 4:22Async programming basics
- 6:06Why async helps
- 7:29Concurrency risks
- 8:12Select for time-bound ops
- 10:00Shared state bugs
- 11:24Mutexes for shared state
- 12:56Deadlocks from ordering
- 13:39Debugging deadlocks
- 15:26Introducing and solving livelocks
- 17:51Async limitations
- 18:32Re-engineering to avoid bugs
- 19:16Actors concurrency model
- 21:46Actors prevent shared state
- 23:36Timeline with actor messages
- 23:58Key takeaways
- 24:40Further learning resources








