SNode awaitFulfill(SNode s,boolean timed,long nanos){
  final long deadline=timed ? System.nanoTime() + nanos : 0L;
  Thread w=Thread.currentThread();
  int spins=(shouldSpin(s) ? (timed ? maxTimedSpins : maxUntimedSpins) : 0);
  for (; ; ) {
    if (w.isInterrupted())     s.tryCancel();
    SNode m=s.match;
    if (m != null)     return m;
    if (timed) {
      nanos=deadline - System.nanoTime();
      if (nanos <= 0L) {
        s.tryCancel();
        continue;
      }
    }
    if (spins > 0)     spins=shouldSpin(s) ? (spins - 1) : 0;
 else     if (s.waiter == null)     s.waiter=w;
 else     if (!timed)     LockSupport.park(this);
 else     if (nanos > spinForTimeoutThreshold)     LockSupport.parkNanos(this,nanos);
  }
}

SNode awaitFulfill ( SNode s , boolean timed , long nanos ) { final long deadline = timed ? System . nanoTime ( ) + nanos : 0L ; Thread w = Thread . currentThread ( ) ; int spins = ( shouldSpin ( s ) ? ( timed ? maxTimedSpins : maxUntimedSpins ) : 0 ) ; for ( ; ; ) { if ( w . isInterrupted ( ) ) s . tryCancel ( ) ; SNode m = s . match ; if ( m != null ) return m ; if ( timed ) { nanos = deadline - System . nanoTime ( ) ; if ( nanos <= 0L ) { s . tryCancel ( ) ; continue ; } } if ( spins > 0 ) spins = shouldSpin ( s ) ? ( spins - 1 ) : 0 ; else if ( s . waiter == null ) s . waiter = w ; else if ( ! timed ) LockSupport . park ( this ) ; else if ( nanos > spinForTimeoutThreshold ) LockSupport . parkNanos ( this , nanos ) ; } }
spins / blocks until node s is matched by a fulfill operation .
