project reactor - How does a Flux built from merges complete -
if have following
flux<string> flux1 = ... flux<string> flux2 = ... flux<string> mergedflux = flux1.merge(flux2); how/when/why mergedflux complete?
the principle of least surprise might suggest complete when of merged fluxes have completed. however, not have witnesses.
the semantics of merge attempt exhaustively replay interleaved emissions of both flux single flux. consequence, merged flux completes when both sources complete.
contrast operator zip aims @ producing many pairs possible taking 1 element each source. such completes when of sources completes, because on cannot produce pairs anymore.
Comments
Post a Comment