Your Brain π§ on Swift Concurrency
summary
Asserts that await is not blocking and demonstrates why awaiting frees threads by suspending tasks, not threads, with diagrams of tasks moving between threads. Explains actor isolation, actor reentrancy, implicit MainActor for SwiftUI ObservableObject, and that functions run on the global executor unless instructed otherwise. Distinguishes unstructured, detached and structured tasks, shows async let and task groups for child tasks, warns to create tasks sparingly and prefer unstructured over detached.
AI-written summary Β· about
chapters (4)
- 0:00Start
- 11:46A practical example...
- 12:21Changing the execution context
- 17:13Creating an unstructured task
related talks
29mWilling Suspension of Disbelief
42mAsync Await and More in Swift
26mSwift Concurrency Under the Hood
44mSwift 6, Async/Await, SwiftUI went into a Bar...
35mThe Multi-Threaded Asynchronous Parallel World of Swift
47mDo We Really Need Actors in Swift Concurrency?
30mA Practical Guide to Swift Concurrency
23mSwift Concurrency is new and hard, and you can do it
