Swift Structured Concurrency
summary
Half-day, hands-on session uses MacOS Monterey and Xcode 13 playgrounds (Swift 5.5) and a GitHub playground repo to show working examples: async await and AsyncImage demo (few lines to fetch and display images), task groups and cancellation (thousand-image loop, cooperative cancellation, reduce/average over results), and actors prevent races (class vs actor race demo and thread-reentrancy caveats). Also covers continuations for legacy callbacks, async sequences with zip/merge, and that the demos compile and run in the playgrounds.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:10Transition to Swift structured concurrency
- 10:26Understanding do-catch in Swift
- 19:34Memory model in Swift concurrency
- 32:10From closures to structured concurrency
- 57:05Swift structured concurrency
- 1:02:27Task creation and execution
- 1:11:28Task cancellation and task groups
- 1:23:16Async-await with multiple tasks
- 1:36:41Why actors are needed
- 1:56:18Actors vs classes vs structs
- 2:03:03SwiftUI and structured concurrency
- 2:12:46Async sequences and algorithms
- 2:26:16Main actor and global actors
- 2:36:24Wrap-up and additional resources
related talks
42mAsync Await and More in Swift
35mThe Multi-Threaded Asynchronous Parallel World of Swift
26mSwift Concurrency Under the Hood
44mSwift 6, Async/Await, SwiftUI went into a Bar...
31mFuture of Swift: A Sneak Peek at async / await
45mThreads, Queues, and Things to Come: Present and Future of Concurrency in Swift
36mTesting Asynchronous Code in Swift 5.5
31mYour Brain 🧠 on Swift Concurrency
