創(chuàng)建線程池的對(duì)象
ExecutorService pool = Executors.newFixedThreadPool(int ?nThread);
//執(zhí)行 實(shí)現(xiàn)runnable接口實(shí)例代表的線程
pool.submit(new Runnable());
pool.shutdown();
創(chuàng)建線程池的對(duì)象
ExecutorService pool = Executors.newFixedThreadPool(int ?nThread);
//執(zhí)行 實(shí)現(xiàn)runnable接口實(shí)例代表的線程
pool.submit(new Runnable());
pool.shutdown();