Learn more about Swift concurrency

What is Approachable Concurrency in Xcode 26?

Published on: July 9, 2025

Xcode 26 allows developers to opt-in to several of Swift 6.2’s features that will make concurrency more approachable to developers through a compiler setting called “Approachable Concurrency” or SWIFT_APPROACHABLE_CONCURRENCY. In this post, we’ll take a look at how to enable approachable concurrency, and which compiler settings are affected by it. How to enable approachable concurrency […]

Read post

What is @concurrent in Swift 6.2?

Updated on: July 7, 2025

Swift 6.2 makes significant changes to concurrency, and because of that we have to understand a brand new mechanism to offload work to a background thread in Swift 6.2. Learn everything you need to know about @concurrent and nonisolated(unsafe). You’ll also find out why I’m pretty happy with these changes even though they require us to relearn certain concurrency concepts.

Read post

Setting default actor isolation in Xcode 26

Published on: June 10, 2025

With Swift 6.2, Apple has made a several improvements to Swift Concurrency and its approachability. One of the biggest changes is that new Xcode projects will now, by default, apply an implicit main actor annotation to all your code. This essentially makes your apps single-threaded by default. I really like this change because without this […]

Read post

Exploring concurrency changes in Swift 6.2

Updated on: June 26, 2025

It’s no secret that Swift concurrency can be pretty difficult to learn. There are a lot of concepts that are different from what you’re used to when you were writing code in GCD. Apple recognized this in one of their vision documents and they set out to make changes to how concurrency works in Swift […]

Read post

Differences between Thread.sleep and Task.sleep explained

Updated on: July 10, 2025

In Swift, we have several ways to “suspend” execution of our code. While that’s almost always a bad practice, I’d like to explain why Task.sleep really isn’t as problematic as you might expect when you’re familiar with Thread.sleep. When you look for examples of debouncing or implementing task timeout they will frequently use Task.sleep to […]

Read post

Protecting mutable state with Mutex in Swift

Updated on: May 8, 2025

Once you start using Swift Concurrency, actors will essentially become your standard choice for protecting mutable state. However, introducing actors also tends to introduce more concurrency than you intended which can lead to more complex code, and a much harder time transitioning to Swift 6 in the long run. When you interact with state that’s […]

Read post

Using singletons in Swift 6

Published on: April 23, 2025

Singletons generally speaking get a bad rep. People don’t like them, they cause issues, and generally speaking it’s just not great practice to rely on globally accessible mutable state in your apps. Instead, it’s more favorable to practice explicit dependency passing which makes your code more testable and reliable overall. That said, sometimes you’ll have […]

Read post

Implementing Task timeout with Swift Concurrency

Updated on: May 1, 2025

Swift Concurrency provides us with loads of cool and interesting capabilities. For example, Structured Concurrency allows us to write a hierarchy of tasks that always ensures all child tasks are completed before the parent task can complete. We also have features like cooperative cancellation in Swift Concurrency which means that whenever we want to cancel […]

Read post

How to plan a migration to Swift 6

Updated on: July 7, 2025

Swift 6 has been available to us for the better part of a year now, and more and more teams are considering or looking at migrating to the Swift 6 language mode. This typically involves trying to turn on the language mode or turning on strict concurrency, seeing a whole bunch of warnings or errors, […]

Read post

Expand your learning with my books

Practical Swift Concurrency header image

Learn everything you need to know about Swift Concurrency and how you can use it in your projects with Practical Swift Concurrency. It contains:

  • Eleven chapters worth of content.
  • Sample projects that use the code shown in the chapters.
  • Free updates for future iOS versions.

The book is available as a digital download for just $39.99!

Learn more