void append(@NonNull Node<E> first, @NonNull Node<E> last) {
    for (;;) {
      Node<E> t = tail;
      if (casTail(t, last)) {
        t.lazySetNext(first);
        if (factory == OPTIMISIC) {
          return;
        }
        for (;;) {
          first.complete();
          if (first == last) {
            return;
          }
          Node<E> next = first.getNextRelaxed();
          if (next.value == null) {
            first.next = null; // reduce nepotism
          }
          first = next;
        }
      }
      Node<E> node = transferOrCombine(first, last);
      if (node == null) {
        first.await();
        return;
      } else if (node != first) {
        last = node;
      }
    }
  }
void append ( @ NonNull Node < E > first , @ NonNull Node < E > last ) { for ( ; ; ) { Node < E > t = tail ; if ( casTail ( t , last ) ) { t . lazySetNext ( first ) ; if ( factory == OPTIMISIC ) { return ; } for ( ; ; ) { first . complete ( ) ; if ( first == last ) { return ; } Node < E > next = first . getNextRelaxed ( ) ; if ( next . value == null ) { first . next = null ; } first = next ; } } Node < E > node = transferOrCombine ( first , last ) ; if ( node == null ) { first . await ( ) ; return ; } else if ( node != first ) { last = node ; } } }
Adds the linked list of nodes to the queue.