Add a fallback for next (for pre 6.2 swift's)

This commit is contained in:
Philippe Hausler committed 2025-09-09 09:39:50 -07:00
1 parent 04fdd4ecba
commit 695aa79f7a
1 file changed
+4
@@ -683,6 +683,10 @@ extension AsyncShareSequence: AsyncSequence {
init(_ iteration: Iteration) {
side = Side(iteration)
}
mutating func next() async rethrows -> Element? {
try await side.next(isolation: nil)
}
mutating func next(isolation actor: isolated (any Actor)?) async throws(Failure) -> Element? {
try await side.next(isolation: actor)