condition精准控制
摘要:
Lock版的生产者消费者问题 那么在synchronized中呢,我们是使用wait和notify来控制线程的。 public synchronized void increment() throws InterruptedException { while (number != 0) { // 等 阅读全文
posted @ 2021-06-07 22:44 Love&Share 阅读(86) 评论(0) 推荐(0)
浙公网安备 33010602011771号