JUC Lock synchronized Condition 8锁
synchronized 消费者生产者案例public class ThreadDemo { public static void main(String[] args) { Resourse resourse = new Resourse(); new Thread(()->{ try { for (int i = 0; i < 10; i++) { resourse.produce(); Thread.sleep(500);} } ca
原创
2021-05-04 20:54:47 ·
86 阅读 ·
0 评论