private Boolean forkJoinPoolShutdown(ForkJoinPool pool, boolean forced) {
    if (pool == null) {
      return true;
    }
    if (forced) {
      pool.shutdownNow();
    } else {
      pool.shutdown();
    }
    return pool.isShutdown();
  }
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