摘要: JAVA实现多线程生产者消费者模型待写 阅读全文
posted @ 2013-01-11 15:37 邪恶痞 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 100张票,10个窗口(10个线程模拟),实现线程卖票计数import java.util.Iterator;import java.util.Map;import java.util.concurrent.ConcurrentHashMap;public class SellTicket implements Runnable { private int count = 100; static Map<String,Integer> map = new ConcurrentHashMap<String,Integer>(); public static void ma 阅读全文
posted @ 2013-01-11 15:34 邪恶痞 阅读(1588) 评论(2) 推荐(0) 编辑