@@ -342,7 +342,6 @@ where Base.Element: Sendable, Base: AsyncSequenceSendableMetatype, Base.AsyncIte
342
342
let state : Mutex < State >
343
343
let limit : Int ?
344
344
345
- #if compiler(>=6.1)
346
345
init (
347
346
_ iteratorFactory: @escaping @Sendable ( ) -> sending Base. AsyncIterator ,
348
347
bufferingPolicy: AsyncBufferSequencePolicy
@@ -355,20 +354,7 @@ where Base.Element: Sendable, Base: AsyncSequenceSendableMetatype, Base.AsyncIte
355
354
self . limit = nil
356
355
}
357
356
}
358
- #else
359
- init (
360
- _ iteratorFactory: @escaping @Sendable ( ) -> Base . AsyncIterator ,
361
- bufferingPolicy: AsyncBufferSequencePolicy
362
- ) {
363
- state = Mutex ( State ( iteratorFactory, bufferingPolicy: bufferingPolicy) )
364
- switch bufferingPolicy. policy {
365
- case . bounded( let limit) :
366
- self . limit = limit
367
- default :
368
- self . limit = nil
369
- }
370
- }
371
- #endif
357
+
372
358
func cancel( ) {
373
359
let ( task, limitContinuation, demand, cancelled) = state. withLock {
374
360
state -> ( IteratingTask ? , UnsafeContinuation < Bool , Never > ? , UnsafeContinuation < Void , Never > ? , Bool ) in
@@ -651,7 +637,7 @@ where Base.Element: Sendable, Base: AsyncSequenceSendableMetatype, Base.AsyncIte
651
637
// Using this priority escalation means that the base task can avoid being detached.
652
638
//
653
639
// This is disabled for now until the 9999 availability is removed from `withTaskPriorityEscalationHandler`
654
- #if false // replace with compiler(>=6.2)
640
+ #if false /* compiler(>=6.2)*/
655
641
guard #available( macOS 26 . 0 , iOS 26 . 0 , tvOS 26 . 0 , visionOS 26 . 0 , * ) else {
656
642
return try await nextIteration ( id) . get ( )
657
643
}
0 commit comments