mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-25 04:27:48 +00:00
Remove Sendable constraint for AsyncAdjacentPairsSequence (#212)
# Motivation We want to remove any `Sendable` constraints on iterators since they ought to not be passed between `Task`s. # Modification Explicitly mark the `AsyncAdjacentPairsSequence` to be not `Sendable`. # Result Nobody can make this `Sendable`.
This commit is contained in:
1 parent
aedcb785a4
commit
c21ee2d706
1 file changed
+4
-2
@@ -83,5 +83,7 @@ extension AsyncSequence {
|
||||
}
|
||||
}
|
||||
|
||||
extension AsyncAdjacentPairsSequence: Sendable where Base: Sendable, Base.Element: Sendable, Base.AsyncIterator: Sendable { }
|
||||
extension AsyncAdjacentPairsSequence.Iterator: Sendable where Base: Sendable, Base.Element: Sendable, Base.AsyncIterator: Sendable { }
|
||||
extension AsyncAdjacentPairsSequence: Sendable where Base: Sendable, Base.Element: Sendable { }
|
||||
|
||||
@available(*, unavailable)
|
||||
extension AsyncAdjacentPairsSequence.Iterator: Sendable { }
|
||||
Reference in new issue
Block a user