第一步:实现runnable类 run方法
第二步:创建多线程池执行
ExecutorService service = Executors.newFixedThreadPool(threadNums);
final CountDownLatch startGate = new CountDownLatch(1);
final CountDownLatch endGate = new CountDownLatch(threadNums);