summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2004-03-08 22:18:57 (GMT)
committerBrett Cannon <bcannon@gmail.com>2004-03-08 22:18:57 (GMT)
commit4b6b7f151501eaee0af46220553c78607474e420 (patch)
tree17a2e9e158add1dd3f27266dea0737370544467f
parent3fd500b4a5a49b2844f0c9cd64a663fd0f6eb2f1 (diff)
downloadcpython-4b6b7f151501eaee0af46220553c78607474e420.zip
cpython-4b6b7f151501eaee0af46220553c78607474e420.tar.gz
cpython-4b6b7f151501eaee0af46220553c78607474e420.tar.bz2
Remove calls to currentThread() in _Condition methods that were side-effect.
Side-effects were deemed unnecessary and were causing problems at shutdown time when threads were catching exceptions at start time and then triggering exceptions trying to call currentThread() after gc'ed. Masked the initial exception which was deemed bad. Fixes bug #754449 .
-rw-r--r--Lib/threading.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 6461adc..ec955c2 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -193,7 +193,6 @@ class _Condition(_Verbose):
return True
def wait(self, timeout=None):
- currentThread() # for side-effect
assert self._is_owned(), "wait() of un-acquire()d lock"
waiter = _allocate_lock()
waiter.acquire()
@@ -235,7 +234,6 @@ class _Condition(_Verbose):
self._acquire_restore(saved_state)
def notify(self, n=1):
- currentThread() # for side-effect
assert self._is_owned(), "notify() of un-acquire()d lock"
__waiters = self.__waiters
waiters = __waiters[:n]