Meet Swift Concurrency
June 7, 2021
Discover the power of asynchronous and concurrent programming in Swift. Meet async/await, which transforms asynchronous functions — such as those using completion handlers — to become more readable and more correct. We’ll take you through the various flavors of structured concurrency for running multiple tasks at once, all while keeping your code free of data races by using Swift actors.
Meet async/await in Swift
Explore structured concurrency in Swift
Protect mutable state with Swift actors
Update a sample app
Once you’ve learned the essentials, put it into practice: Follow along as we update a sample app from a previous WWDC and adopt Swift concurrency.
Swift concurrency: Update a sample app
Meet AsyncSequence
Sometimes there can be more than one: when you have a sequence of values arriving over time, use the new “for await” syntax to iterate over them.
Meet AsyncSequence
Discover concurrency across Apple platforms
Hundreds of APIs throughout the system have been updated with support for async/await. Find out how the frameworks you use every day have been improved for Swift concurrency.
Discover concurrency in SwiftUI
Use async/await with URLSession
Bring Core Data concurrency to Swift and SwiftUI
Swift concurrency: Behind the scenes
Dive into the details of Swift concurrency and discover how Swift provides greater safety from data races and thread explosion while simultaneously improving performance. We’ll explore how Swift tasks differ from Grand Central Dispatch, how the new cooperative threading model works, and how to ensure the best performance for your apps.