code: public void abort(Throwable t) {
          // Set the result to the given exception
          boolean abortSuccessful = getResultFuture().completeExceptionally(t);
  
          if (abortSuccessful) {
              // Attempt to abort the task
              getTaskFuture().cancel(true);
          }
      }
docs: Complete the result future with the given exception and attempt to cancel the task.
  <p>
  This is typically used as part of timeout.