continue restart; } else if (!ATOMIC_HELPER.casWaiters(this, curr, succ)) { // We are unlinking head continue restart; // We raced with an add or complete
do { node.setNext(oldHead); if (ATOMIC_HELPER.casWaiters(this, oldHead, node)) { while (true) { LockSupport.parkNanos(this, remainingNanos);
do { node.setNext(oldHead); if (ATOMIC_HELPER.casWaiters(this, oldHead, node)) {
/** Clears the {@link #waiters} list and returns the most recently added value. */ private Waiter clearWaiters() { Waiter head; do { head = waiters; } while (!ATOMIC_HELPER.casWaiters(this, head, Waiter.TOMBSTONE)); return head; }