線程

synchronized和ReentrantLock之多線程同步詳解

https://www.jianshu.com/p/96c89e6e7e90

notify(),notifyAll()鎖池,等待池

https://blog.csdn.net/djzhao/article/details/79410229

讓線程阻塞的幾種方法join()方法,Executor的invokeAll()方法,future.get()方法

ExecutorService exec= Executors.newFixedThreadPool(5);
try {
    List<Future<String>> futures = exec.invokeAll(new ArrayList<Callable<String>>());
} catch (InterruptedException e) {
    e.printStackTrace();
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章