public class test {
public static void main(String[] args) {
ExecutorService pool = Executors.newFixedThreadPool(2);
// ExecutorService pool = Executors.newCachedThreadPool();//无限个
pool.submit(new run());
pool.submit(new run());
pool.submit(new run());
pool.submit(new run());
pool.shutdown();
}
}