public void sendMessageUntilStopCount(int stopCount){
  for (int i=processedWorkerCount; i < workers.size(); ++i) {
    ActorRef worker=workers.get(i);
    try {
      Thread.sleep(1L);
    }
 catch (    InterruptedException e) {
      logger.error("sleep exception " + e + " details: ",e);
    }
    worker.tell(OperationWorkerMsgType.PROCESS_REQUEST,originalManager);
    processedWorkerCount++;
    if (processedWorkerCount > stopCount) {
      return;
    }
    logger.debug("REQ_SENT: {} / {} taskId {}",processedWorkerCount,requestTotalCount,taskIdTrim);
  }
}

public void sendMessageUntilStopCount ( int stopCount ) { for ( int i = processedWorkerCount ; i < workers . size ( ) ; ++ i ) { ActorRef worker = workers . get ( i ) ; try { Thread . sleep ( 1L ) ; } catch ( InterruptedException e ) { logger . error ( "sleep exception " + e + " details: " , e ) ; } worker . tell ( OperationWorkerMsgType . PROCESS_REQUEST , originalManager ) ; processedWorkerCount ++ ; if ( processedWorkerCount > stopCount ) { return ; } logger . debug ( "REQ_SENT: {} / {} taskId {}" , processedWorkerCount , requestTotalCount , taskIdTrim ) ; } }
note that if there is sleep in this method .
