Ruby:线程实现经典的生产者消费者问题

时间:2014-04-28 18:11:11   收藏:0   阅读:531

bubuko.com,布布扣

运行结果:

bubuko.com,布布扣
ProAndCon
0 produced
1 produced
consumed 0
2 produced
3 produced
consumed 1
consumed 2
consumed 3
4 produced
consumed 4
5 produced
consumed 5
bubuko.com,布布扣

转载自:http://www.oschina.net/code/snippet_1045481_33311

 

Ruby:线程实现经典的生产者消费者问题,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!