discard items emitted by an Observable until a second Observable emits an item
The SkipUntil subscribes to the source Observable, but ignores its emissions until such time as a second Observable emits an item, at which point SkipUntil begins to mirror the source Observable.
skipUntil
skipUntil
In RxGroovy, this operator is implemented as skipUntil
.
skipUntil
does not by default operate on any particular Scheduler.
skipUntil(Observable)
skipUntil
In RxJava, this operator is implemented as skipUntil
.
skipUntil
does not by default operate on any particular Scheduler.
skipUntil(Observable)
skipUntil
RxJS implements the skipUntil
operator. You can pass it either an Observable or a Promise
that it will monitor for an item that triggers skipUntil
to begin mirroring the source Observable.
var source = Rx.Observable.timer(0, 1000) .skipUntil(Rx.Observable.timer(5000)); var subscription = source.subscribe( function (x) { console.log('Next: ' + x); }, function (err) { console.log('Error: ' + err); }, function () { console.log('Completed'); });
skipUntil
is found in each of the following distributions:
rx.js
rx.all.js
rx.all.compat.js
rx.compat.js
rx.lite.js
rx.lite.compat.js
There is also a skipUntilWithTime
operator to which you can pass an absolute time or an initial duration in place of an Observable, but this is described on the Skip operator page.
skipUntil
RxPHP implements this operator as skipUntil
.
Returns the values from the source observable sequence only after the other observable sequence produces a value.
//from https://github.com/ReactiveX/RxPHP/blob/master/demo/skip/skipUntil.php $observable = Rx\Observable::interval(1000) ->skipUntil(\Rx\Observable::timer(5000)) ->take(3); $observable->subscribe($stdoutObserver);
© ReactiveX contributors
Licensed under the Apache License 2.0.
http://reactivex.io/documentation/operators/skipuntil.html