home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __license__ = 'GPL v3'
- __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
- import threading
- import Queue
-
- class DeviceManager(object):
-
- def __init__(self):
- self.devices = []
- self.device_jobs = Queue(0)
-
-
-
- class Job(object):
- count = 0
-
- def __init__(self, func, args):
- self.completed = False
- self.exception = None
-
-
-
- class Worker(threading.Thread):
-
- def __init__(self, jobs):
- self.jobs = jobs
- self.results = []
- threading.Thread.__init__(self)
- self.setDaemon(True)
-
-
- def run(self):
- while True:
- self.jobs.get(True, None)
- self.jobs.task_done()
-
-
-