What new Swift concurrency properties have been added in Swift 6.2

Asked on 06/11/2025

1 search

In Swift 6.2, several new concurrency properties and improvements have been introduced to make concurrency more approachable and safer. Here are some key changes:

  1. Single-threaded by Default: Swift 6.2 changes the default behavior to stay single-threaded until concurrency is explicitly introduced. This makes the most natural code data race-free by default, providing a safer path to introducing concurrency in projects.

  2. Async Functions on Mutable State: It is now easier to call async functions on types with mutable state. Instead of offloading async functions that aren't tied to a specific actor, the function will continue to run on the actor it was called from, eliminating data races.

  3. Isolated Conformances: Swift 6.2 supports isolated conformances, allowing conformances that need main actor state to be safely implemented. The compiler ensures that a main actor conformance is only used on the main actor.

  4. Concurrent Attribute: A new concurrent attribute allows for offloading CPU-intensive tasks to the background, keeping apps responsive.

  5. Opt-in Language Changes: Some concurrency language changes are opt-in and can be enabled under the Swift Compiler Concurrency section of Xcode Build Settings or in a Swift package manifest file using the Swift Settings API.

  6. Migration Tooling: Swift 6.2 includes migration tooling to help make necessary code changes automatically, making it easier to adopt these concurrency improvements.

For more detailed information, you can refer to the session What’s new in Swift (00:30:28).