Skip to main content

Module ops_impl

Module ops_impl 

Source
Expand description

Concrete implementations of the four subscription-managed combinators (zip / concat / race / takeUntil). Built on the super::producer::ProducerCtx substrate.

Functions§

concat
concat(first, second) — forward DATA from first until it completes, then drain any DATA second emitted during phase 1 (buffered) and continue forwarding second. ERROR from either source terminates the producer with the same ERROR.
race
race(s1, s2, ..., sN) — subscribes to all sources; the first to emit DATA wins. Subsequent traffic from the winner is forwarded; losers’ messages are no-ops (per Q4=(b) — losers stay subscribed but their sink callbacks short-circuit). Saves the dynamic rewiring cost of explicitly unsubscribing losers.
take_until
take_until(source, notifier) — forward DATA from source until notifier emits its first DATA, then terminate the producer with COMPLETE. Errors from either source cascade. Source COMPLETE terminates the producer.
zip
zip(s1, s2, ..., sN) — collect one value from each source, emit a tuple, repeat. Models RxJS / TS zip: