Async Await and More in Swift
summary
Shows a practical cow herd demo that actually builds wash feed and collect milk flows and proves async/await reduces branching versus completion handlers. Walks through using async let child tasks for fixed parallelism, task groups for dynamic lists, cooperative cancellation, and continuations with Xcode’s refactor to create async wrappers. Demonstrates actors (and the main actor) preventing data races with live examples that compile and run, and gives concrete warnings: don’t mark everything async, avoid OS thread locks, prefer structured over detached tasks.
AI-written summary · about
chapters (11)
- 0:00Async await in Swift
- 2:52Async await syntax
- 7:06Structured concurrency with async let
- 13:53Task cancellation
- 16:01Dynamic concurrency with task groups
- 19:35Unstructured concurrency
- 23:31Actors for shared state
- 30:54Main actor and threading
- 32:18Swift concurrency benefits
- 33:46Recommendations and best practices
- 37:00Q&A
related talks
35mThe Multi-Threaded Asynchronous Parallel World of Swift
31mYour Brain 🧠 on Swift Concurrency
02h 42mSwift Structured Concurrency
24mAsync/await in Swift
44mSwift 6, Async/Await, SwiftUI went into a Bar...
35mSwiftUI, Async/Await, AsyncAlgorithms: How does it all fit?
31mFuture of Swift: A Sneak Peek at async / await
29mWilling Suspension of Disbelief
