What determines whether a Swift 5.5 Task initializer runs on the main thread?
I think the rule must be that a Task initializer in a MainActor method runs on the main thread. And all methods of a view controller are MainActor methods by default; plus, I observe that if I declare test2 to be nonisolated, its Task operation runs on a background thread instead of the main thread. … Read more