33

超详细的Java 生产者消费者模式分析-wx5d9ed7c8443c3的博客

 4 years ago
source link: https://blog.51cto.com/14570694/2447411
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
生产者消费者模式是多线程中最为常见的模式:生产者线程(一个或多个)生成面包放进篮子里(集合或数组),同时,消费者线程(一个或多个)从篮子里(集合或数组)取出面包消耗。虽然它们任务不同,但处理的资源是相同的,这体现的是一种线程间通信方式。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK