final void producedOne() { if (unbounded) { return; } if (wip == 0 && WIP.compareAndSet(this, 0, 1)) { long r = requested; if (r != Long.MAX_VALUE) { r--; if (r < 0L) { reportMoreProduced(); r = 0; } requested = r; } else { unbounded = true; } if (WIP.decrementAndGet(this) == 0) { return; } drainLoop(); return; } addCap(MISSED_PRODUCED, this, 1L); drain(); }
public final void produced(long n) { if (unbounded) { return; } if (wip == 0 && WIP.compareAndSet(this, 0, 1)) { long r = requested; if (r != Long.MAX_VALUE) { long u = r - n; if (u < 0L) { reportMoreProduced(); u = 0; } requested = u; } else { unbounded = true; } if (WIP.decrementAndGet(this) == 0) { return; } drainLoop(); return; } addCap(MISSED_PRODUCED, this, n); drain(); }
long v = u - mp; if (v < 0L) { reportMoreProduced(); v = 0;
public final void produced(long n) { if (unbounded) { return; } if (wip == 0 && WIP.compareAndSet(this, 0, 1)) { long r = requested; if (r != Long.MAX_VALUE) { long u = r - n; if (u < 0L) { reportMoreProduced(); u = 0; } requested = u; } else { unbounded = true; } if (WIP.decrementAndGet(this) == 0) { return; } drainLoop(); return; } addCap(MISSED_PRODUCED, this, n); drain(); }
final void producedOne() { if (unbounded) { return; } if (wip == 0 && WIP.compareAndSet(this, 0, 1)) { long r = requested; if (r != Long.MAX_VALUE) { r--; if (r < 0L) { reportMoreProduced(); r = 0; } requested = r; } else { unbounded = true; } if (WIP.decrementAndGet(this) == 0) { return; } drainLoop(); return; } addCap(MISSED_PRODUCED, this, 1L); drain(); }
final void produced(long n) { if (unbounded) { return; } if (wip == 0 && WIP.compareAndSet(this, 0, 1)) { long r = requested; if (r != Long.MAX_VALUE) { long u = r - n; if (u < 0L) { Operators.reportMoreProduced(); u = 0; } requested = u; } else { unbounded = true; } if (WIP.decrementAndGet(this) == 0) { return; } drainLoop(); return; } Operators.addCap(MISSED_PRODUCED, this, n); drain(); }
final void produced(long n) { if (unbounded) { return; } if (wip == 0 && WIP.compareAndSet(this, 0, 1)) { long r = requested; if (r != Long.MAX_VALUE) { long u = r - n; if (u < 0L) { Operators.reportMoreProduced(); u = 0; } requested = u; } else { unbounded = true; } if (WIP.decrementAndGet(this) == 0) { return; } drainLoop(); return; } Operators.addCap(MISSED_PRODUCED, this, n); drain(); }
final void produced(long n) { if (unbounded) { return; } if (wip == 0 && WIP.compareAndSet(this, 0, 1)) { long r = requested; if (r != Long.MAX_VALUE) { long u = r - n; if (u < 0L) { Operators.reportMoreProduced(); u = 0; } requested = u; } else { unbounded = true; } if (WIP.decrementAndGet(this) == 0) { return; } drainLoop(); return; } Operators.addCap(MISSED_PRODUCED, this, n); drain(); }
long v = u - mp; if (v < 0L) { reportMoreProduced(); v = 0;
long v = u - mp; if (v < 0L) { Operators.reportMoreProduced(); v = 0;
long v = u - mp; if (v < 0L) { Operators.reportMoreProduced(); v = 0;
long v = u - mp; if (v < 0L) { Operators.reportMoreProduced(); v = 0;