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 a643fe4 commit 12c3eb2Copy full SHA for 12c3eb2
test/Concurrency/Runtime/mainactor.swift
@@ -66,6 +66,8 @@ actor A {
66
67
// CHECK: starting
68
// CHECK-NOT: ERROR
69
+// CHECK: Hello from the main function
70
+// CHECK-NOT: ERROR
71
// CHECK: hello from main actor!
72
73
// CHECK: on actor instance's queue
@@ -77,6 +79,11 @@ actor A {
77
79
@main struct RunIt {
78
80
static func main() async {
81
print("starting")
82
+ if checkIfMainQueue(expectedAnswer: true) {
83
+ print("Hello from the main function")
84
+ } else {
85
+ print("ERROR: not on the main queue")
86
+ }
87
let result = await someFunc()
88
print("finished with return counter = \(result)")
89
}
0 commit comments