CountDownLatch
# Overview 一种同步辅助工具,允许一个或多个线程等待其他线程正在执行的一组操作完成。 A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes. CountDownLatch 以给定的计数初始化。await 方法会阻塞,直到当前计数因调用 CountDown 方法而归零,之后所有等待的线程都会被释放,并且 await 的任何后续调用都会立即返回。这是一种一次性现象 --...
more...