Await in async function isolated to @MainActor resumes on non-main thread - Bug?

Your code is correct, and it is the beta 5 compiler that is wrong. This pull request fixed the issue you are seeing. The first Xcode it made it into is the recent Xcode 13 RC.

Doug

2 Likes