code: public void stopChecking() {
          // synchronize with other attempts to update the running task
          synchronized(runningTaskLock){
              if(runningTask != null) {
                  // cancel task (let it complete its current run if running)
                  runningTaskFuture.cancel(false);
                  // log
                  LOGGER.debug("Stop criterion checker for search {} deactivated", search);
                  // discard task
                  runningTask = null;
                  runningTaskFuture = null;
              }
          }
      }
docs: Instructs the stop criterion checker to stop checking. In case the checker is not active,
  calling this method does not have any effect.