Goodspeed

导航

2012年8月20日 #

自己写的线程池

摘要: #!/usr/bin/python#coding=utf-8#http://docs.python.org/library/threading.htmlimport threading, time, randomfrom collections import dequeclass threadPool(object): def __init__(self, maxNum = 10): self.maxNum = maxNum self.deque = deque() def push(self, target, args = None): ... 阅读全文

posted @ 2012-08-20 17:30 Goodspeed 阅读(281) 评论(0) 推荐(0) 编辑