public void await() throws InterruptedException {
  Thread t=Thread.currentThread();
  if (!ownerAccess.compareAndSet(this,null,t)) {
    throw new IllegalStateException("A second thread tried to acquire a signal barrier that is already owned.");
  }
  LockSupport.park(this);
  ownerAccess.compareAndSet(this,t,null);
  if (t.isInterrupted())   throw new InterruptedException();
}

public void await ( ) throws InterruptedException { Thread t = Thread . currentThread ( ) ; if ( ! ownerAccess . compareAndSet ( this , null , t ) ) { throw new IllegalStateException ( "A second thread tried to acquire a signal barrier that is already owned." ) ; } LockSupport . park ( this ) ; ownerAccess . compareAndSet ( this , t , null ) ; if ( t . isInterrupted ( ) ) throw new InterruptedException ( ) ; }
claim the signalbarrier and block until signaled .
