Java tutorial
//package com.java2s; import java.util.concurrent.*; public class Main { public final static ExecutorService getComputingPool(float loadFactor) { return Executors.newFixedThreadPool((int) (Runtime.getRuntime().availableProcessors() / (1 - loadFactor))); } }