Combines elements from two sources into tuples Pair handling early completion of either source.
def zipAll[U, A >: Out](that: Graph[SourceShape[U], _], thisElem: A, thatElem: U): Repr[(A, U)] def zipAllMat[U, Mat2, Mat3, A >: Out](that: Graph[SourceShape[U], Mat2], thisElem: A, thatElem: U)(matF: (Mat, Mat2) => Mat3): ReprMat[(A, U), Mat3]
Combines elements from two sources into tuples Pair and passes downstream. If either source completes, a default value is combined with each value from the other source until it completes.
Source<Integer, NotUsed> numbers = Source.from(Arrays.asList(1, 2, 3, 4)); Source<String, NotUsed> letters = Source.from(Arrays.asList("a", "b", "c")); numbers.zipAll(letters, -1, "default").runForeach(System.out::println, system); // prints: // Pair(1,a) // Pair(2,b) // Pair(3,c) // Pair(4,default)
emits at first emits when both inputs emit, and then as long as any input emits (coupled to the default value of the completed input)
backpressures both upstreams when downstream backpressures but also on an upstream that has emitted an element until the other upstream has emitted an element
completes when both upstream completes