| Type | Launched by | Launchable from | Lifetime | Cancellation | Inherits from origin |
|---|---|---|---|---|---|
| async-let tasks | async let |
async functions | scoped by statement | automatic | prioprity, task-local values |
| Group tasks | group.async |
withTaskGroup | scoped by task group | automatic | prioprity, task-local values |
| Unstructured tasks | Task.init |
anywhere | unscoped | Task.cancel() |
prioprity, task-local values, actor |
| Detached tasks | Task.detached |
anywhere | unscoped | Task.cancel() |
nothing |
Swift concurrency: Behind the scenes at 24:40
| ✅ Safe primitives | 🚫 Unsafe Primitives | |
|---|---|---|
| await, Actors, Task groups | os_unfair_lock, NSLock in synchronus code |
DispatchSemaphore, pthread_cond, NSCondition, pthread_rw_lock, etc |
| Compiler enforced | No compiler support | No compiler support |
Platforms: iOS 15, macOS 12
- Meet async/await in Swift
- Discover concurrency in SwiftUI
- Explore structured concurrency in Swift
- Swift concurrency: Update a sample app
- Use async/await with URLSession
- Bring Core Data concurrency to Swift and SwiftUI
- Swift concurrency: Behind the scenes
- Protect mutable state with Swift actors
Platforms: iOS 16, macOS 13
- Meet Swift Async Algorithms
- Meet distributed actors in Swift
- Eliminate data races using Swift Concurrency
- Visualize and optimize Swift concurrency
- 2021 LLVM Dev Mtg "Asynchronous Functions in Swift"
- Scale By The Bay 2021 : Konrad Malawski, Distributed Systems with Swift
- Scale By The Bay 2021 : Tim Condon, Distributed Tracing with Swift
- Swift Concurrency Under the Hood - iOS Conf SG 2022
- Swift Unwrapped
- The raywenderlich.com Podcast
- Swift by Sundell
- Async/await
- Concurrency Interoperability with Objective-C
- Async/Await: Sequences
- Continuations for interfacing async tasks with synchronous code
- Sendable and @Sendable closures
- Structured concurrency
- Actors
- Effectful Read-only Properties
- Task Local Values
- Improved control over actor isolation
- AsyncStream and AsyncThrowingStream
- Global actors
- async let bindings
- Custom Executors
- Distributed Actors
- Asynchronous Main Semantics