Skip to content

Commit 59b06e1

Browse files
authored
Merge pull request swiftlang#35943 from compnerd/sleep
test: repair the test on Windows
2 parents 4eae2ed + c20b0a5 commit 59b06e1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Concurrency/Runtime/async_task_priority_current.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Darwin
88
import Glibc
99
#elseif os(Windows)
1010
import CRT
11+
import WinSDK
1112
#else
1213
#error("Unsupported platform")
1314
#endif
@@ -34,7 +35,11 @@ func test_multiple_lo_indirectly_escalated() async {
3435
@concurrent
3536
func loopUntil(priority: Task.Priority) async {
3637
while (await Task.__unsafeCurrentAsync().task.priority != priority) {
38+
#if os(Windows)
39+
Sleep(1)
40+
#else
3741
sleep(1)
42+
#endif
3843
}
3944
}
4045

0 commit comments

Comments
 (0)