What does @concurrent do

Asked on 06/15/2025

1 search

The @concurrent attribute in Swift is used to indicate that a function should run on the concurrent thread pool, freeing up the actor to run other tasks simultaneously. This attribute is part of Swift's concurrency model, which aims to make concurrent code easier to write and safer by identifying potential data races at compile time. By using @concurrent, you can offload work to the background, improving the performance and responsiveness of your app, especially for CPU-intensive tasks.

For more detailed information, you can refer to the session Embracing Swift concurrency (10:22) from WWDC 2025, which discusses introducing concurrency and the use of concurrent functions.