@Test public void cancelAfterIterator() { TestSubscriber<Integer> ts = new TestSubscriber<>(Long.MAX_VALUE); Multi.just(1) .<Integer>flatMapIterable(v -> () -> { ts.cancel(); return IntStream.range(0, 2).boxed().iterator(); }) .subscribe(ts); ts.assertEmpty(); }
@Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } MultiFlatMapIterable(Multi<T> source,
                         Function<? super T, ? extends Iterable<? extends R>> mapper,
                         int prefetch); }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } MultiFlatMapIterable(Multi<T> source,
                         Function<? super T, ? extends Iterable<? extends R>> mapper,
                         int prefetch); @Override void subscribe(Flow.Subscriber<? super R> subscriber); }
MultiFlatMapIterable implements Multi<R> { @Override public void subscribe(Flow.Subscriber<? super R> subscriber) { source.subscribe(new FlatMapIterableSubscriber<>(subscriber, mapper, prefetch)); } MultiFlatMapIterable(Multi<T> source,
                         Function<? super T, ? extends Iterable<? extends R>> mapper,
                         int prefetch); @Override void subscribe(Flow.Subscriber<? super R> subscriber);  }