What problem does it solve?
Swift 6.2 Approachable Concurrency prevents implicit background offloading that can trigger data-race errors, especially when using MainActor types and async code that previously appeared safe.
Core Features & Use Cases
- Implicit actor preservation: Async functions stay on the calling actor by default, removing accidental cross-actor execution.
- Isolated conformances for MainActor types: MainActor-isolated types can safely conform to non-isolated protocols without unsafe workarounds.
- Explicit parallelism with @concurrent: Offload CPU-intensive work deliberately, while keeping the rest single-threaded and race-free.
- MainActor default inference: Reduce repetitive @MainActor annotations by inferring isolation for app-like executable targets.
- Use cases: Migrating Swift 5.x/6.0-6.1 code, fixing concurrency compiler errors, structuring MainActor-centric architectures, and moving heavy computation off the main path.
Quick Start
Enable Swift 6.2 Approachable Concurrency settings in Xcode, then adjust only the hotspots that need parallelism by marking the specific background work with @concurrent.