mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-28 04:54:20 +00:00
Add a fallback for next (for pre 6.2 swift's)
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user