-
-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
Following was tested on Ubuntu:
import DefaultBackend
import SwiftCrossUI
import Foundation
#if canImport(SwiftBundlerRuntime)
import SwiftBundlerRuntime
#endif
@main
@HotReloadable
struct MainApp: App {
var body: some Scene {
WindowGroup("Main") {
#hotReloadable {
Button("Run Task") {
Task {
print("Task is running.")
Task {
print("Task inside Task is running.")
}
// None of these ever runs. Why?
Task { @MainActor in
print("Task @MainActor is running")
}
await MainActor.run {
print("MainActor.run is running")
}
DispatchQueue.main.async {
print("DispatchQueue.main.async is running")
}
}
}
}
}
.defaultSize(width: 400, height: 200)
}
}Metadata
Metadata
Assignees
Labels
No labels