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 55// REQUIRES: concurrency_runtime
66// UNSUPPORTED: back_deployment_runtime
77
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-
148protocol P {
159 func f( )
1610}
@@ -208,6 +202,10 @@ await Task.detached { @SomeGlobalActor in
208202print ( " Testing a separate task off the main actor " )
209203await Task . detached {
210204 if #available( SwiftStdlib 6 . 2 , * ) {
205+ // Skip tests on platforms that use the same executor for the main
206+ // actor and the global concurrent executor.
207+ guard Task . defaultExecutor !== MainActor . executor else { return }
208+
211209 precondition ( !tryCastToP( mc) )
212210 precondition ( !tryCastToP( wrappedMC) )
213211
You can’t perform that action at this time.
0 commit comments