ตัวเลือกที่ 1:
newWorkStealingPoolจากExecutors
public static ExecutorService newWorkStealingPool()
  สร้างเธรดพูลที่ขโมยงานโดยใช้โปรเซสเซอร์ที่มีอยู่ทั้งหมดเป็นระดับความขนานของเป้าหมาย
ด้วย API ExecutorServiceนี้คุณไม่ต้องผ่านการจำนวนของแกนไป
การใช้งาน API นี้จากgrepcode
/**
     * Creates a work-stealing thread pool using all
     * {@link Runtime#availableProcessors available processors}
     * as its target parallelism level.
     * @return the newly created thread pool
     * @see #newWorkStealingPool(int)
     * @since 1.8
     */
    public static ExecutorService newWorkStealingPool() {
        return new ForkJoinPool
            (Runtime.getRuntime().availableProcessors(),
             ForkJoinPool.defaultForkJoinWorkerThreadFactory,
             null, true);
    }
ทางเลือกที่ 2:
newFixedThreadPool API จากExecutorsหรือother newXXX constructorsซึ่งส่งคืนExecutorService
public static ExecutorService newFixedThreadPool(int nThreads)
แทนที่ nThreads ด้วย Runtime.getRuntime().availableProcessors()
ทางเลือกที่ 3:
ThreadPoolExecutor
public ThreadPoolExecutor(int corePoolSize,
                      int maximumPoolSize,
                      long keepAliveTime,
                      TimeUnit unit,
                      BlockingQueue<Runnable> workQueue)
ผ่านเป็นพารามิเตอร์Runtime.getRuntime().availableProcessors()maximumPoolSize