Skip to content

Commit ea666db

Browse files
committed
Import Glibc or Darwin as appropriate
1 parent 95ee2f2 commit ea666db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Concurrency/Runtime/data_race_detection.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010

1111
import _Concurrency
1212
import Dispatch
13+
14+
// For sleep
15+
#if canImport(Darwin)
1316
import Darwin
17+
#elseif canImport(Glibc)
18+
import Glibc
19+
#endif
1420

1521
@MainActor func onMainActor() {
1622
print("I'm on the main actor!")

0 commit comments

Comments
 (0)