@Test public void otherSignalItem() { TestSubscriber<Object> ts = new TestSubscriber<>(); Multi.never() .takeUntil(Multi.range(1, 5)) .subscribe(ts); ts.assertResult(); }
@Override public void subscribe(Flow.Subscriber<? super T> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); TakeUntilMainSubscriber<T> parent = new TakeUntilMainSubscriber<>(subscriber); subscriber.onSubscribe(parent); other.subscribe(parent.other()); source.subscribe(parent); }
MultiTakeUntilPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); TakeUntilMainSubscriber<T> parent = new TakeUntilMainSubscriber<>(subscriber); subscriber.onSubscribe(parent); other.subscribe(parent.other()); source.subscribe(parent); } }
MultiTakeUntilPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); TakeUntilMainSubscriber<T> parent = new TakeUntilMainSubscriber<>(subscriber); subscriber.onSubscribe(parent); other.subscribe(parent.other()); source.subscribe(parent); } MultiTakeUntilPublisher(Multi<T> source, Flow.Publisher<U> other); }
MultiTakeUntilPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); TakeUntilMainSubscriber<T> parent = new TakeUntilMainSubscriber<>(subscriber); subscriber.onSubscribe(parent); other.subscribe(parent.other()); source.subscribe(parent); } MultiTakeUntilPublisher(Multi<T> source, Flow.Publisher<U> other); @Override void subscribe(Flow.Subscriber<? super T> subscriber); }
MultiTakeUntilPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { Objects.requireNonNull(subscriber, "subscriber is null"); TakeUntilMainSubscriber<T> parent = new TakeUntilMainSubscriber<>(subscriber); subscriber.onSubscribe(parent); other.subscribe(parent.other()); source.subscribe(parent); } MultiTakeUntilPublisher(Multi<T> source, Flow.Publisher<U> other); @Override void subscribe(Flow.Subscriber<? super T> subscriber);  }