docs: public static void run(boolean parallel, int N, IndexRunnable ir, ExecutorService threadPool)
      {
          if(!parallel)
          {
              for(int i = 0; i < N; i++)
                  ir.run(i);
              return;
          }
          
          final CountDownLatch latch = new CountDownLatch(N);
  
          IntStream.range(0, N).forEach(threadID ->
          {
              threadPool.submit(() ->
              {
                  ir.run(threadID);
                  latch.countDown();
              });
          });
  
          try
          {
              latch.await();
          }
          catch (InterruptedException ex)
          {
              Logger.getLogger(ParallelUtils.class.getName()).log(Level.SEVERE, null, ex);
          }
  
      }