File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ func asyncSemaphoreWaitSignal() async throws {
41
41
// Allow the task a few cycles to reach the initial semaphore.wait()
42
42
try ? await Task . sleep ( nanoseconds: 1_000 )
43
43
44
- #expect( !didEnterCriticalSection) // should still be waiting
44
+ #expect( !didEnterCriticalSection) // should still be waiting
45
45
46
46
// Now release the semaphore – the waiter should proceed
47
47
await semaphore. signal ( )
@@ -52,7 +52,7 @@ func asyncSemaphoreWaitSignal() async throws {
52
52
// will be false below
53
53
await semaphore. wait ( )
54
54
55
- #expect( didEnterCriticalSection) // waiter must have run
55
+ #expect( didEnterCriticalSection) // waiter must have run
56
56
}
57
57
58
58
@Test func basicAsyncSemaphoreTest( ) async throws {
Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
15
15
@_spi ( DispatchAsync) import DispatchAsync
16
+ import Testing
17
+
16
18
import func Foundation. sin
19
+
17
20
#if !os(WASI)
18
21
import class Foundation. Thread
19
22
#endif
20
- import Testing
21
23
22
24
private typealias DispatchGroup = DispatchAsync . DispatchGroup
23
25
private typealias DispatchQueue = DispatchAsync . DispatchQueue
@@ -143,7 +145,7 @@ struct DispatchGroupTests {
143
145
let workQueue = DispatchQueue ( attributes: . concurrent)
144
146
let group = DispatchGroup ( )
145
147
146
- let isolationQueue = DispatchQueue ( label: " isolationQueue " )
148
+ let isolationQueue = DispatchQueue ( label: " isolationQueue " )
147
149
nonisolated ( unsafe) var counter = 0
148
150
149
151
for _ in 0 ..< iterations {
@@ -195,5 +197,3 @@ struct DispatchGroupTests {
195
197
#expect( finalCount == iterations)
196
198
}
197
199
}
198
-
199
-
You can’t perform that action at this time.
0 commit comments