Avatar
@swift-main import Foundation let task = Task { @MainActor () in print(Thread.current.isMainThread) dispatchPrecondition(condition: .onQueue(.main)) dispatchPrecondition(condition: .notOnQueue(.main)) } await task.value (edited)