@@ -342,7 +342,6 @@ where Base.Element: Sendable, Base: AsyncSequenceSendableMetatype, Base.AsyncIte
342342 let state : Mutex < State >
343343 let limit : Int ?
344344
345- #if compiler(>=6.1)
346345 init (
347346 _ iteratorFactory: @escaping @Sendable ( ) -> sending Base. AsyncIterator ,
348347 bufferingPolicy: AsyncBufferSequencePolicy
@@ -355,20 +354,7 @@ where Base.Element: Sendable, Base: AsyncSequenceSendableMetatype, Base.AsyncIte
355354 self . limit = nil
356355 }
357356 }
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+
372358 func cancel( ) {
373359 let ( task, limitContinuation, demand, cancelled) = state. withLock {
374360 state -> ( IteratingTask ? , UnsafeContinuation < Bool , Never > ? , UnsafeContinuation < Void , Never > ? , Bool ) in
@@ -651,7 +637,7 @@ where Base.Element: Sendable, Base: AsyncSequenceSendableMetatype, Base.AsyncIte
651637 // Using this priority escalation means that the base task can avoid being detached.
652638 //
653639 // 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)*/
655641 guard #available( macOS 26 . 0 , iOS 26 . 0 , tvOS 26 . 0 , visionOS 26 . 0 , * ) else {
656642 return try await nextIteration ( id) . get ( )
657643 }
0 commit comments