takeUntil<S> method

Observable<T> takeUntil <S>(Stream<S> otherStream)

Returns the values from the source observable sequence until the other observable sequence produces a value.

Example

new Observable.merge([
    new Observable.just(1),
    new Observable.timer(2, new Duration(minutes: 1))
  ])
  .takeUntil(new Observable.timer(3, new Duration(seconds: 10)))
  .listen(print); // prints 1

Implementation

Observable<T> takeUntil<S>(Stream<S> otherStream) =>
    transform(new TakeUntilStreamTransformer<T, S>(otherStream));