Skip to content

Commit 6c132c3

Browse files
committed
Only use the last CoreFoundation reference on Apple platforms
1 parent 2e727dc commit 6c132c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/XCTest/Public/Asynchronous/XCTWaiter.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// XCTWaiter.swift
1111
//
1212

13-
#if !os(Windows)
13+
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
1414
import CoreFoundation
1515
#endif
1616

@@ -369,10 +369,10 @@ private extension XCTWaiter {
369369

370370
func cancelPrimitiveWait() {
371371
guard let runLoop = runLoop else { return }
372-
#if os(Windows)
373-
runLoop._stop()
374-
#else
372+
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
375373
CFRunLoopStop(runLoop.getCFRunLoop())
374+
#else
375+
runLoop._stop()
376376
#endif
377377
}
378378
}

0 commit comments

Comments
 (0)