ExecutorService,如何等待所有任务完成
ExecutorService
ExecutorService es = Executors.newFixedThreadPool(2);for (DataTable singleTable : uniquePhrases) { es.execute(new ComputeDTask(singleTable));}try{ es.wait();} catch (InterruptedException e){ e.printStackTrace();}
ComputeDTask
wait()
IllegalMonitorStateException
uniquePhrases
浮云间
相关分类