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
}
@@ -208,6 +202,10 @@ await Task.detached { @SomeGlobalActor in
208
202
print ( " Testing a separate task off the main actor " )
209
203
await Task . detached {
210
204
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
+
211
209
precondition ( !tryCastToP( mc) )
212
210
precondition ( !tryCastToP( wrappedMC) )
213
211
You can’t perform that action at this time.
0 commit comments