diff options
author | Brett Cannon <bcannon@gmail.com> | 2005-01-08 02:43:53 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2005-01-08 02:43:53 (GMT) |
commit | e6539c4401cd3f60a5cc176717852886cb9d152a (patch) | |
tree | 6bc7274b8d6297d3bfe8cd78ca12977a737133a3 /Lib | |
parent | 922b3e2098d9903d915aa7ce19d8e3c8973643d0 (diff) | |
download | cpython-e6539c4401cd3f60a5cc176717852886cb9d152a.zip cpython-e6539c4401cd3f60a5cc176717852886cb9d152a.tar.gz cpython-e6539c4401cd3f60a5cc176717852886cb9d152a.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/threading.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/threading.py b/Lib/threading.py index 860c2fd..61c25b6 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -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 |