@Override protected void doRequest(long n) { if ((options & REQUEST) == REQUEST && log.isInfoEnabled()) { log.info("⇡ " + concatId() + "request({})", Long.MAX_VALUE == n ? "unbounded" : n); } super.doRequest(n); }
@Override protected void doRequest(long n) { if (BackpressureUtils.getAndAdd(PENDING_UPDATER, this, n) == 0) { super.doRequest(n); if (!tryDrain()) { requestMissing(); } } else if (terminated == 1) { if (tryDrain() && TERMINATED.compareAndSet(this, 1, 2)) { super.doComplete(); } } }
private void requestMissing() { if (pendingDemand != Long.MAX_VALUE) { super.doRequest(1L); } }