网站介绍:文章浏览阅读142次。1. 使用syncronize实现 static Object[] items = new Object[100]; static int takePoint = 0, putPoint = 0; static AtomicInteger cnt = new AtomicInteger(0); public synchronized static void produce(Object o) throws InterruptedException { w
- 链接地址:https://blog.csdn.net/weianluo/article/details/117328843
- 链接标题:生产者 - 消费者模型_马各阿牛的博客-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:4379
- 网站标签:生产者 - 消费者模型