private void unlockRunState(int oldRunState,int newRunState){
  if (!U.compareAndSwapInt(this,RUNSTATE,oldRunState,newRunState)) {
    Object lock=stealCounter;
    runState=newRunState;
    if (lock != null) synchronized (lock) {
      lock.notifyAll();
    }
  }
}

private void unlockRunState ( int oldRunState , int newRunState ) { if ( ! U . compareAndSwapInt ( this , RUNSTATE , oldRunState , newRunState ) ) { Object lock = stealCounter ; runState = newRunState ; if ( lock != null ) synchronized ( lock ) { lock . notifyAll ( ) ; } } }
unlocks and sets runstate to newrunstate .
