(self)
| 10 | self.start() |
| 11 | |
| 12 | def run(self): |
| 13 | while True: |
| 14 | func, args, kargs = self.tasks.get() |
| 15 | try: func(*args, **kargs) |
| 16 | except Exception, e: print e |
| 17 | self.tasks.task_done() |
| 18 | |
| 19 | class ThreadPool: |
| 20 | """Pool of threads consuming tasks from a queue""" |
no test coverage detected