File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 5
5
// REQUIRES: concurrency_runtime
6
6
// UNSUPPORTED: back_deployment_runtime
7
7
8
- // FIXME: WebAssembly doesn't currently have a good way to install the
9
- // "isCurrentGlobalActor" hook on which this checking depends. Disable
10
- // the test for the moment.
11
- // UNSUPPORTED: wasm
12
- // UNSUPPORTED: CPU=wasm32
13
-
14
8
protocol P {
15
9
func f( )
16
10
}
@@ -207,6 +201,10 @@ await Task.detached { @SomeGlobalActor in
207
201
// CHECK: Testing a separate task off the main actor
208
202
print ( " Testing a separate task off the main actor " )
209
203
await Task . detached {
204
+ // Skip tests on platforms that use the same executor for the main
205
+ // actor and the global concurrent executor.
206
+ guard Task . defaultExecutor !== MainActor . executor else { return }
207
+
210
208
if #available( SwiftStdlib 6 . 2 , * ) {
211
209
precondition ( !tryCastToP( mc) )
212
210
precondition ( !tryCastToP( wrappedMC) )
You can’t perform that action at this time.
0 commit comments