private Reference<? extends T> dequeue(){
  if (false)   VM.sysWriteln("in dequeue, this = ",Magic.objectAsAddress(this));
  lock.lockWithHandshake();
  if (false)   VM.sysWriteln("locked.");
  Reference<? extends T> result=dequeueImpl();
  lock.unlock();
  return result;
}

private Reference < ? extends T > dequeue ( ) { if ( false ) VM . sysWriteln ( "in dequeue, this = " , Magic . objectAsAddress ( this ) ) ; lock . lockWithHandshake ( ) ; if ( false ) VM . sysWriteln ( "locked." ) ; Reference < ? extends T > result = dequeueImpl ( ) ; lock . unlock ( ) ; return result ; }
remove a reference from the queue , if there is one .
