You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mainstructEntryPoint3:AsyncParsableCommand{@MainActormutatingfunc run()asyncthrows{print("Thread is main: \(Thread.isMainThread)")print("Current Thread ID: \(GetCurrentThreadId())")MainActor.preconditionIsolated()awaitwithCheckedContinuation{ con inDispatchQueue.main.async{print("Thread is main (queue): \(Thread.isMainThread)")print("Current Thread ID (queue): \(GetCurrentThreadId())")MainActor.preconditionIsolated()
con.resume()}}print("completed")}}
Output:
Thread is main: false
Current Thread ID: 498188
Thread is main (queue): false
Current Thread ID (queue): 498188
completed
Output:
Thread on Swift Forums https://forums.swift.org/t/mainactor-behaves-different-on-windows-and-macos/74742
The text was updated successfully, but these errors were encountered: