code: public <T> T invoke(ForkJoinTask<T> task) {
          if (task == null)
              throw new NullPointerException();
          externalSubmit(task);
          return task.join();
      }
docs: Performs the given task, returning its result upon completion.
  If the computation encounters an unchecked Exception or Error,
  it is rethrown as the outcome of this invocation.  Rethrown
  exceptions behave in the same way as regular exceptions, but,
  when possible, contain stack traces (as displayed for example
  using {@code ex.printStackTrace()}) of both the current thread
  as well as the thread actually encountering the exception;
  minimally only the latter.
  
  @param task the task
  @param <T> the type of the task's result
  @return the task's result
  @throws NullPointerException if the task is null
  @throws RejectedExecutionException if the task cannot be
  scheduled for execution