@@ -273,7 +273,7 @@ public final class ConnectionPool<
273
273
274
274
public func run( ) async {
275
275
await withTaskCancellationHandler {
276
- #if swift(>=5.8) && os(Linux) || swift (>=5.9)
276
+ #if os(Linux) || compiler (>=5.9)
277
277
if #available( macOS 14 . 0 , iOS 17 . 0 , tvOS 17 . 0 , watchOS 10 . 0 , * ) {
278
278
return await withDiscardingTaskGroup ( ) { taskGroup in
279
279
await self . run ( in: & taskGroup)
@@ -313,7 +313,7 @@ public final class ConnectionPool<
313
313
case scheduleTimer( StateMachine . Timer )
314
314
}
315
315
316
- #if swift(>=5.8) && os(Linux) || swift (>=5.9)
316
+ #if os(Linux) || compiler (>=5.9)
317
317
@available ( macOS 14 . 0 , iOS 17 . 0 , tvOS 17 . 0 , watchOS 10 . 0 , * )
318
318
private func run( in taskGroup: inout DiscardingTaskGroup ) async {
319
319
for await event in self . eventStream {
@@ -507,7 +507,7 @@ public final class ConnectionPool<
507
507
await withTaskGroup ( of: TimerRunResult . self, returning: Void . self) { taskGroup in
508
508
taskGroup. addTask {
509
509
do {
510
- #if swift(>=5.8) && os(Linux) || swift (>=5.9)
510
+ #if os(Linux) || compiler (>=5.9)
511
511
try await self . clock. sleep ( for: timer. duration)
512
512
#else
513
513
try await self . clock. sleep ( until: self . clock. now. advanced ( by: timer. duration) , tolerance: nil )
@@ -593,7 +593,7 @@ protocol TaskGroupProtocol {
593
593
mutating func addTask_( operation: @escaping @Sendable ( ) async -> Void )
594
594
}
595
595
596
- #if swift(>=5.8) && os(Linux) || swift(>=5.9)
596
+ #if os(Linux) || swift(>=5.9)
597
597
@available ( macOS 14 . 0 , iOS 17 . 0 , tvOS 17 . 0 , watchOS 10 . 0 , * )
598
598
extension DiscardingTaskGroup : TaskGroupProtocol {
599
599
@inlinable
0 commit comments