Avatar
Avatar
Iceman
@swift-5.9.2 -Xfrontend -parse-as-library import Foundation @main struct Main { static func main() async { print(Thread.isMainThread) Task { @MainActor in print(Thread.isMainThread) } print("blocking!!!") sleep(2) print("blocking end") sleep(1) } }
true blocking!!! blocking end