Concurrency 4

How to use SwiftData

Issue #1040

SwiftData is Apple’s modern persistence framework, introduced in iOS 17. It builds on top of Core Data but exposes a Swift-native API using macros and property wrappers. For most apps targeting iOS 17 or later, it replaces Core Data …

How to use isolated and nonisolated in Swift 6 concurrency

Issue #1039

Actor isolation in Swift 6 is not binary. A type can be mostly isolated while selectively exposing some members to callers from any context. A function can accept any actor and run directly on its executor without being bound to it …

How to use Swift 6 concurrency

Issue #1038

Swift 6 concurrency replaces Grand Central Dispatch queues, locks, and completion handlers with a structured model built around async/await, actors, and task groups. The compiler enforces isolation rules at build time, and the runtime …

How to avoid Swift 6 concurrency crashes

Issue #1037

Enabling Swift 6 strict concurrency checking (SWIFT_STRICT_CONCURRENCY = complete) catches data races at compile time, but it does not protect you fully at runtime. The compiler also injects dynamic isolation assertions at actor and GCD …