code: @Override
      public void finish() {
          if (started.get() && !finished.getAndSet(true)) {
              waitUntilFinished();
              super.finish();
              // recreate thread (don't start) for processor reuse
              createProcessorThread();
              clearQueues();
              started.set(false);
          }
      }
docs: Signals that the processor to finish and waits until it finishes.