1:获取cpu核心数: Runtime.getRuntime().availableProcessors();
创建线程池: Executors.newFixedThreadPool(nThreads);//nThreads为线程数2: