code: public void submit(Task<? extends TaskResult> task) {
  
          // Increment the counter which indicates the number of results to
          // expect. This must be done BEFORE actually submitting the task for
          // execution.
          remainingTasks.incrementAndGet();
  
          // Increment the statistics and put the task on the correct queue.
          stats.incrementStartedTasks(task.resultType);
          executors.get(task.resultType).submit(task);
  
          // Make sure that the task gets added to the results queue.
          resultsQueue.add(task);
          stats.updateMemoryInfo();
      }
docs: Submits a task to one of the compiler's task queues for processing. Although public, this method should only be
  called by tasks started by the compiler itself.
  
  @param task task to run on one of the compiler's task queues