ARTICLE AD BOX
I have an older project that was created before Xcode 26.2.
In Xcode versions prior to 26.2, there was no Swift Compiler – Concurrency build setting.

With those older versions, the following behavior occurs: a nonisolated function executes off the main thread.
class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() run() } private func run() { Task { await runInMainThread() } } func runInMainThread() async { print(">>>> IN runInMainThread(), Thread.isMainThread \(Thread.isMainThread)") await runInBackgroundThread() } private nonisolated func runInBackgroundThread() async { print(">>>> IN runInBackgroundThread(), Thread.isMainThread \(Thread.isMainThread)") } }Output:
>>>> IN runInMainThread(), Thread.isMainThread true >>>> IN runInBackgroundThread(), Thread.isMainThread falseHowever, starting with Xcode 26.2, Apple introduced the Swift Compiler – Concurrency settings.

When running the same code with the default configuration:
Approachable Concurrency = Yes Default Actor Isolation = MainActorThis is the output
Output:
>>>> IN runInMainThread(), Thread.isMainThread true >>>> IN runInBackgroundThread(), Thread.isMainThread truethe nonisolated function now executes on the main thread.
This raises the following questions:
What is the correct Swift Compiler – Concurrency configuration if I want a nonisolated function to run off the main thread?
Is nonisolated still an appropriate way to ensure code runs on a background thread?
