@Override public void onComplete() { if (done) { return; } done = true; worker.dispose(); disposeTimer(); arbiter.onComplete(s); }
@Override public void onError(Throwable t) { if (done) { RxJavaPlugins.onError(t); return; } done = true; worker.dispose(); disposeTimer(); arbiter.onError(t, s); }
@Override public void onNext(T t) { if (done) { return; } long idx = index + 1; index = idx; if (arbiter.onNext(t, s)) { scheduleTimeout(idx); } }
@Override public void onSubscribe(Disposable s) { if (SubscriptionHelper.validateDisposable(this.s, s)) { return; } this.s = s; if (arbiter.setSubscription(s)) { actual.onSubscribe(arbiter); scheduleTimeout(0L); } }