Esempio n. 1
0
 def __init__(self, interval, function, args=[], kwargs={}):
     Thread.__init__(self)
     self.interval = interval
     self.function = function
     self.args = args
     self.kwargs = kwargs
     self.finished = Event()
Esempio n. 2
0
 def __init__(self, interval, function, args=[], kwargs={}):
     Thread.__init__(self)
     self.interval = interval
     self.function = function
     self.args = args
     self.kwargs = kwargs
     self.finished = Event()
Esempio n. 3
0
    def __init__(self):
        Thread.__init__(self, name=_newname("Dummy-%d"))

        # Thread.__block consumes an OS-level locking primitive, which
        # can never be used by a _DummyThread.  Since a _DummyThread
        # instance is immortal, that's bad, so release this resource.
        del self._Thread__block

        self._Thread__started = True
        _active_limbo_lock.acquire()
        _active[_get_ident()] = self
        _active_limbo_lock.release()
Esempio n. 4
0
    def __init__(self):
        Thread.__init__(self, name=_newname("Dummy-%d"))

        # Thread.__block consumes an OS-level locking primitive, which
        # can never be used by a _DummyThread.  Since a _DummyThread
        # instance is immortal, that's bad, so release this resource.
        del self._Thread__block

        self._Thread__started = True
        _active_limbo_lock.acquire()
        _active[_get_ident()] = self
        _active_limbo_lock.release()
Esempio n. 5
0
 def __init__(self, queue, count):
     Thread.__init__(self, name="Consumer")
     self.queue = queue
     self.count = count
Esempio n. 6
0
 def __init__(self, queue, quota):
     Thread.__init__(self, name="Producer")
     self.queue = queue
     self.quota = quota
Esempio n. 7
0
 def __init__(self):
     Thread.__init__(self, name="MainThread")
     self._Thread__started = True
     _active_limbo_lock.acquire()
     _active[_get_ident()] = self
     _active_limbo_lock.release()
Esempio n. 8
0
 def __init__(self, queue, count):
     Thread.__init__(self, name="Consumer")
     self.queue = queue
     self.count = count
Esempio n. 9
0
 def __init__(self, queue, quota):
     Thread.__init__(self, name="Producer")
     self.queue = queue
     self.quota = quota
Esempio n. 10
0
 def __init__(self):
     Thread.__init__(self, name="MainThread")
     self._Thread__started = True
     _active_limbo_lock.acquire()
     _active[_get_ident()] = self
     _active_limbo_lock.release()