Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #5
0
 def __init__(self, queue, count):
     Thread.__init__(self, name="Consumer")
     self.queue = queue
     self.count = count
Beispiel #6
0
 def __init__(self, queue, quota):
     Thread.__init__(self, name="Producer")
     self.queue = queue
     self.quota = quota
Beispiel #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()
Beispiel #8
0
 def __init__(self, queue, count):
     Thread.__init__(self, name="Consumer")
     self.queue = queue
     self.count = count
Beispiel #9
0
 def __init__(self, queue, quota):
     Thread.__init__(self, name="Producer")
     self.queue = queue
     self.quota = quota
Beispiel #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()