Avatar
@swift-5.7.3 import Foundation protocol P: Sendable { func f() } final class C: P { @MainActor func f() { print(Thread.isMainThread) } } let c = C() let p: P = C() Task { print(Thread.isMainThread) await c.f() p.f() } RunLoop.main.run(until: Date().addingTimeInterval(0.3)) (edited)