[Python-checkins] python/dist/src/Lib threading.py,1.40,1.41

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Mon Mar 8 17:19:00 EST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4913/Lib

Modified Files:
	threading.py 
Log Message:
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 .


Index: threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** threading.py	29 Jan 2004 06:37:49 -0000	1.40
--- threading.py	8 Mar 2004 22:18:57 -0000	1.41
***************
*** 194,198 ****
  
      def wait(self, timeout=None):
-         currentThread() # for side-effect
          assert self._is_owned(), "wait() of un-acquire()d lock"
          waiter = _allocate_lock()
--- 194,197 ----
***************
*** 236,240 ****
  
      def notify(self, n=1):
-         currentThread() # for side-effect
          assert self._is_owned(), "notify() of un-acquire()d lock"
          __waiters = self.__waiters
--- 235,238 ----




More information about the Python-checkins mailing list