@Override public boolean isEmpty() { return queue.isEmpty(); } }
@Override public final boolean isEmpty() { return queue.isEmpty(); } }
@Override public boolean isEmpty() { return current == null && queue.isEmpty(); }
@Override public boolean isEmpty() { return queue.isEmpty(); } }
@Override public final boolean isEmpty() { return queue.isEmpty(); } }
@Override public boolean isEmpty() { return current == null && queue.isEmpty(); }
if (done && q.isEmpty()) { Throwable ex = error; if (ex != null) {
long r = requested.get(); SimpleQueue<U> q = queue; if (r != 0L && (q == null || q.isEmpty())) { downstream.onNext(value); if (r != Long.MAX_VALUE) {
if (e == r && checkTerminated(done, q.isEmpty(), a)) { return;
if (checkTerminated(done, q.isEmpty(), a)) { return;
if (emitted == r && checkTerminated(done, q.isEmpty(), a)) { return;
boolean empty = q.isEmpty(); if (delayErrors) { if (empty) {
if (q != null && !q.isEmpty()) { empty = false; break;
if (q != null && !q.isEmpty()) { empty = false; break;
long r = requested.get(); SimpleQueue<U> q = inner.queue; if (r != 0L && (q == null || q.isEmpty())) { downstream.onNext(value); if (r != Long.MAX_VALUE) {
if (q.isEmpty()) { cancelled = true; a.onComplete();
if (q.isEmpty()) { cancelled = true; a.onComplete();
boolean empty = q.isEmpty();
boolean empty = q.isEmpty();
@Test public void dontDropItemsWhenNoReadyConsumers() { final MulticastProcessor<Integer> mp = new MulticastProcessor<Integer>(128, true); mp.onSubscribe(new BooleanSubscription()); mp.onNext(1); TestSubscriber<Integer> ts = new TestSubscriber<Integer>(); final MulticastSubscription<Integer> ms1 = new MulticastSubscription<Integer>(ts, mp); ts.onSubscribe(ms1); assertTrue(mp.add(ms1)); ms1.set(Long.MIN_VALUE); mp.drain(); assertFalse(mp.queue.isEmpty()); } }