code: public static <T> T runAsyncSupplierWithCpuCores(Supplier<T> supplier, int cpuCores)
  		throws ExecutionException, InterruptedException
  	{
  		ForkJoinPool forkJoinPool = new ForkJoinPool(cpuCores);
  		CompletableFuture<T> future = CompletableFuture.supplyAsync(supplier, forkJoinPool);
  		return future.get();
  	}
docs: Creates a custom thread pool that are executed in parallel processes with the will run with
  the given number of the cpu cores
  
  @param supplier
  the {@link Supplier} task to execute
  @param cpuCores
  the number of the cpu cores to run with
  @param <T>
  the generic type of the result
  @return the result of the given task
  @throws ExecutionException
  if the computation threw an exception
  @throws InterruptedException
  if the current thread is not a member of a ForkJoinPool and was interrupted while
  waiting