Skip to content

Commit be681c1

Browse files
authored
Remove Sendable constraint for AsyncChain2Sequence (apple#213)
# Motivation We want to remove any `Sendable` constraints on iterators since they ought to not be passed between `Task`s. # Modification Explicitly mark the `AsyncChain2Sequence` to be not `Sendable`. # Result Nobody can make this `Sendable`.
1 parent c21ee2d commit be681c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/AsyncAlgorithms/AsyncChain2Sequence.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,6 @@ extension AsyncChain2Sequence: AsyncSequence {
8080
}
8181

8282
extension AsyncChain2Sequence: Sendable where Base1: Sendable, Base2: Sendable { }
83-
extension AsyncChain2Sequence.Iterator: Sendable where Base1.AsyncIterator: Sendable, Base2.AsyncIterator: Sendable { }
83+
84+
@available(*, unavailable)
85+
extension AsyncChain2Sequence.Iterator: Sendable { }

0 commit comments

Comments
 (0)