We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14a311b commit 6839086Copy full SHA for 6839086
test/Concurrency/Runtime/data_race_detection.swift
@@ -35,7 +35,7 @@ func launchTask(_ fn: @escaping () -> Void) {
35
}
36
37
38
-@MainActor func launchFromMainThread() {
+func launchFromMainThread() {
39
launchTask(promiseMainThread(onMainActor))
40
41
@@ -55,7 +55,7 @@ actor MyActor {
55
56
@main
57
struct Runner {
58
- @MainActor static func main() async {
+ static func main() async {
59
print("Launching a main-actor task")
60
// CHECK: warning: data race detected: @MainActor function at main/data_race_detection.swift:21 was not called on the main thread
61
launchFromMainThread()
0 commit comments