private synchronized void finish() {
        if (myState != FINISHED) {
          myState = mySingleProcessingGuard ? FINISHED : INITIAL;
          notifyAll();
        }
      }
private synchronized void finish()