In RxClojure there are six operators of concern here:
RxCpp implements this operator as merge
.
RxGroovy implements this operator as merge
, mergeWith
, and
mergeDelayError
.
The instance version of merge
is mergeWith
, so, for example, in the
code sample above, instead of writing Observable.merge(odds,evens)
you could also
write odds.mergeWith(evens)
.
mergeWith(Observable)
If any of the individual Observables passed into merge
terminates with an
onError
notification, the Observable produced by merge
itself will
immediately terminate with an onError
notification. If you would prefer a merge
that continues emitting the results of the remaining, error-free Observables before reporting
the error, use mergeDelayError
instead.
RxJava implements this operator as merge
, mergeWith
, and
mergeDelayError
.
Instead of passing multiple Observables (up to nine) into merge
, you could also
pass in a List<>
(or other Iterable) of Observables, an Array of
Observables, or even an Observable that emits Observables, and merge
will merge
their output into the output of a single Observable:
The instance version of merge
is mergeWith
, so, for example,
instead of writing Observable.merge(odds,evens)
you could also write
odds.mergeWith(evens)
.
If any of the individual Observables passed into merge
terminates with an
onError
notification, the Observable produced by merge
itself will
immediately terminate with an onError
notification. If you would prefer a merge
that continues emitting the results of the remaining, error-free Observables before reporting
the error, use mergeDelayError
instead.
RxKotlin implements this operator as merge
, mergeWith
, and
mergeDelayError
.
Instead of passing multiple Observables (up to nine) into merge
, you could also
pass in a List<>
(or other Iterable) of Observables, an Array of
Observables, or even an Observable that emits Observables, and merge
will merge
their output into the output of a single Observable:
The instance version of merge
is mergeWith
, so, for example,
instead of writing Observable.merge(odds,evens)
you could also write
odds.mergeWith(evens)
.
If any of the individual Observables passed into merge
terminates with an
onError
notification, the Observable produced by merge
itself will
immediately terminate with an onError
notification. If you would prefer a merge
that continues emitting the results of the remaining, error-free Observables before reporting
the error, use mergeDelayError
instead.
Rx.NET implements this operator as Merge
.
RxPY implements this operator as merge
and
merge_all
/merge_observable
.
Rx.rb implements this operator as merge
, merge_concurrent
, and
merge_all
.
merge_concurrent
operates on an Observable that emits Observables, merging the
emissions from each of these Observables into its own emissions. You can optionally pass it
an integer parameter indicating how many of these emitted Observables
merge_concurrent
should try to subscribe to concurrently. Once it reaches this
maximum subscription count, it will refrain from subscribing to any other Observables emitted
by the source Observable until such time as one of the already-subscribed-to Observables
issues an onCompleted
notification. The default is 1, which makes it equivalent
to merge_all
.
RxScala implements this operator as flatten
, flattenDelayError
,
merge
, and mergeDelayError
.
RxSwift implements this operator as merge
.