docs: private Object awaitFulfill(QNode pred, QNode s, Object e, int mode, long nanos) {
      if (mode == NOWAIT) {
        return null;
      }
  
      long lastTime = mode == TIMEOUT ? System.nanoTime() : 0;
      Thread w = Thread.currentThread();
      int spins = -1; // set to desired spin count below
      for (;;) {
        if (w.isInterrupted()) {
          s.compareAndSet(e, s);
        }
        Object x = s.get();
        if (x != e) { // Node was matched or cancelled
          advanceHead(pred, s); // unlink if head
          if (x == s) { // was cancelled
            clean(pred, s);
            return null;
          } else if (x != null) {
            s.set(s); // avoid garbage retention
            return x;
          } else {
            return e;
          }
        }
        if (mode == TIMEOUT) {
          long now = System.nanoTime();
          nanos -= now - lastTime;
          lastTime = now;
          if (nanos <= 0) {
            s.compareAndSet(e, s); // try to cancel
            continue;
          }
        }
        if (spins < 0) {
          QNode h = this.head.get(); // only spin if at head
          spins = h != null && h.next == s ? (mode == TIMEOUT ? maxTimedSpins : maxUntimedSpins) : 0;
        }
        if (spins > 0) {
          --spins;
        } else if (s.waiter == null) {
          s.waiter = w;
        } else if (mode != TIMEOUT) {
          // LockSupport.park(this);
          LockSupport.park(); // allows run on java5
          s.waiter = null;
          spins = -1;
        } else if (nanos > spinForTimeoutThreshold) {
          // LockSupport.parkNanos(this, nanos);
          LockSupport.parkNanos(nanos);
          s.waiter = null;
          spins = -1;
        }
      }
    }