exhaustMap<S> method

Observable<S> exhaustMap<S>(
  1. Stream<S> mapper(
    1. T value

Converts items from the source stream into a new Stream using a given mapper. It ignores all items from the source stream until the new stream completes.

Useful when you have a noisy source Stream and only want to respond once the previous async operation is finished.


Observable.range(0, 2).interval(new Duration(milliseconds: 50))
  .exhaustMap((i) =>
    new Observable.timer(i, new Duration(milliseconds: 75)))
  .listen(print); // prints 0, 2


Observable<S> exhaustMap<S>(Stream<S> mapper(T value)) =>
    transform(ExhaustMapStreamTransformer<T, S>(mapper));