Skip to content

Commit d9ef216

Browse files
authored
Concurrency: Avoid importing Dispatch with no global executor (#37059)
Dispatch is not available on platforms where `SWIFT_CONCURRENCY_COOPERATIVE_GLOBAL_EXECUTOR` is defined `0`, e.g. WebAssembly/WASI..
1 parent cbfe3ed commit d9ef216

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/public/Concurrency/Actor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
#include "swift/ABI/Actor.h"
2828
#include "llvm/ADT/PointerIntPair.h"
2929
#include "TaskPrivate.h"
30+
31+
#if !SWIFT_CONCURRENCY_COOPERATIVE_GLOBAL_EXECUTOR
3032
#include <dispatch/dispatch.h>
33+
#endif
3134

3235
#if defined(__APPLE__)
3336
#include <asl.h>

0 commit comments

Comments
 (0)