code: public static ExecutorService newCachedThreadPool(ThreadFactory threadFactory) {
          return new ThreadPoolExecutor(0, Integer.MAX_VALUE,
                                        60L, TimeUnit.SECONDS,
                                        new SynchronousQueue<Runnable>(),
                                        threadFactory);
      }
docs: Creates a thread pool that creates new threads as needed, but
  will reuse previously constructed threads when they are
  available, and uses the provided
  ThreadFactory to create new threads when needed.
  @param threadFactory the factory to use when creating new threads
  @return the newly created thread pool
  @throws NullPointerException if threadFactory is null