protected int waitFor(int counter){
  if (counter > 100)   --counter;
 else   if (counter > 0) {
    --counter;
    Thread.yield();
  }
 else {
    LockSupport.parkNanos(1l);
  }
  return counter;
}

protected int waitFor ( int counter ) { if ( counter > 100 ) -- counter ; else if ( counter > 0 ) { -- counter ; Thread . yield ( ) ; } else { LockSupport . parkNanos ( 1l ) ; } return counter ; }
simple wait strategy to avoid cpu overload scenarios due to active waiting for nothing
