public ForkJoinPool getAgentPublisherCommandsPool() {
    if (agentPublisherCommandsPool == null){
      logThreadPoolCreation(AGENT_COMMAND_PUBLISHER_POOL_NAME, configuration.getAgentCommandPublisherThreadPoolSize());
      agentPublisherCommandsPool = new ForkJoinPool(
        configuration.getAgentCommandPublisherThreadPoolSize(),
        createNamedFactory(AGENT_COMMAND_PUBLISHER_POOL_NAME),
        (t, e) -> {
          LOG.error("Unexpected exception in thread: " + t, e);
          throw new RuntimeException(e);
        },
        false
      );
    }
    return agentPublisherCommandsPool;
  }
Determines the need of waiting for all tasks to be processed:
true - next task would be processed
false - next task would be cancelled
@param <T>
ambari-server/src/main/java/org/apache/ambari/server/utils/ThreadPools.java