摘要:
# -*- coding:utf-8 -*-import threadingfrom random import Randomimport timeclass Producer(threading.Thread): def __init__(self, products, lock): threading.Thread.__init__(self) self.__products = products self.__lock = lock def run(self): _random = Random(100) while True: if len(self.__products) > 阅读全文
posted @ 2011-03-04 22:49
steven zhao
阅读(253)
评论(0)
推荐(0)