Combines elements from another publisher and deliver pairs of elements as tuples.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
A publisher that emits pairs of elements from the upstream publishers as tuples.
The returned publisher waits until both publishers have emitted an event, then delivers the oldest unconsumed event from each publisher together as a tuple to the subscriber. For example, if publisher
P1 emits elements
b, and publisher
P2 emits event
c, the zip publisher emits the tuple
(a, c). It won’t emit a tuple with event
P2 emits another event. If either upstream publisher finishes successfully or fails with an error, the zipped publisher does the same.