Avatar
@swift-5.5.3 -Xfrontend -parse-as-library import Foundation @globalActor actor HogeActor { static var shared = HogeActor() } @main struct Main { @MainActor static func mainActorFunc() async { } static func nonisolatedFunc() async { print(Thread.isMainThread) await mainActorFunc() print(Thread.isMainThread) } static func main() async { await Task { @HogeActor in await nonisolatedFunc() }.value } }