private void finishCompletion(){
  for (WaitNode q; (q=waiters) != null; ) {
    if (UNSAFE.compareAndSwapObject(this,waitersOffset,q,null)) {
      for (; ; ) {
        Thread t=q.thread;
        if (t != null) {
          q.thread=null;
          LockSupport.unpark(t);
        }
        WaitNode next=q.next;
        if (next == null)         break;
        q.next=null;
        q=next;
      }
      break;
    }
  }
  done();
  callable=null;
}

private void finishCompletion ( ) { for ( WaitNode q ; ( q = waiters ) != null ; ) { if ( UNSAFE . compareAndSwapObject ( this , waitersOffset , q , null ) ) { for ( ; ; ) { Thread t = q . thread ; if ( t != null ) { q . thread = null ; LockSupport . unpark ( t ) ; } WaitNode next = q . next ; if ( next == null ) break ; q . next = null ; q = next ; } break ; } } done ( ) ; callable = null ; }
removes and signals all waiting threads , invokes done ( ) , and nulls out callable .
