@Override public void waitRoll(){
  WaitLock.lock();
  while (!RollState.compareAndSet(ROLLSTATE_HALTED,ROLLSTATE_HALTED)) {
    try {
      WaitCondition.await();
    }
 catch (    InterruptedException ex) {
      ex.printStackTrace();
    }
  }
  WaitLock.unlock();
}

@ Override public void waitRoll ( ) { WaitLock . lock ( ) ; while ( ! RollState . compareAndSet ( ROLLSTATE_HALTED , ROLLSTATE_HALTED ) ) { try { WaitCondition . await ( ) ; } catch ( InterruptedException ex ) { ex . printStackTrace ( ) ; } } WaitLock . unlock ( ) ; }
wait for the current roll to complete processing .
