public interface Condition {
void await() throws InterruptedException; // 将该线程放到条件的等待集中
void awaitUninterruptibly();
long awaitNanos(long manosTimeout) throws InterruptedException;
boolean await(long time, TimeUnit unit) throws InterruptedException;
boolean awaitUntil(Date deadline) throws InterruptedException;
void signal(); // 解除该条件等待集中的所有线程的阻塞状态
void signalAll(); // 从该条件等待集中随机的选择一个线程,解除其阻塞状态
}
并发编程之Condition接口源码
最新推荐文章于 2022-06-29 09:22:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)