code: public static void run(boolean parallel, int N, LoopChunkRunner lcr)
      {
          ExecutorService threadPool = Executors.newFixedThreadPool(SystemInfo.LogicalCores);
          run(parallel, N, lcr, threadPool);
          threadPool.shutdownNow();
      }
docs: This helper method provides a convenient way to break up a computation
  across <tt>N</tt> items into contiguous ranges that can be processed
  independently in parallel.
  
  @param parallel a boolean indicating if the work should be done in
  parallel. If false, it will run single-threaded. This is for code
  convenience so that only one set of code is needed to handle both cases.
  @param N the total number of items to process
  @param lcr the runnable over a contiguous range