code: private void cancelInvokable(AbstractInvokable invokable) {
  		// in case of an exception during execution, we still call "cancel()" on the task
  		if (invokable != null && invokableHasBeenCanceled.compareAndSet(false, true)) {
  			try {
  				invokable.cancel();
  			}
  			catch (Throwable t) {
  				LOG.error("Error while canceling task {}.", taskNameWithSubtask, t);
  			}
  		}
  	}
docs: ------------------------------------------------------------------------