Avatar
Avatar
kntk
@swift-5.5.3 @swift-5.6.3 @swift-5.7.3 -Xfrontend -parse-as-library import Foundation @main struct Main { static func nonisolatedFunc() async { print(Thread.isMainThread) try? await Task.sleep(nanoseconds: 1_000) print(Thread.isMainThread) } static func main() async { await nonisolatedFunc() } } (edited)
true false (edited)