In _DummyThread objects the lock stored in __block (allocated thanks to

_Thread.__init__) was never used.  This is a waste since locks use OS
primitives that are in limited supply.  So the lock is deleted in
_DummyThread.__init__ .

Closes bug #1089632.
This commit is contained in:
Brett Cannon 2005-01-08 02:43:53 +00:00
parent 922b3e2098
commit e6539c4401
2 changed files with 6 additions and 0 deletions

View file

@ -653,6 +653,7 @@ class _DummyThread(Thread):
def __init__(self):
Thread.__init__(self, name=_newname("Dummy-%d"))
del self._Thread__block
self._Thread__started = True
_active_limbo_lock.acquire()
_active[_get_ident()] = self