[Python-checkins] CVS: python/dist/src/Lib threading.py,1.14,1.14.2.1

Guido van Rossum gvanrossum@users.sourceforge.net
Sat, 18 Aug 2001 21:41:51 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv2449

Modified Files:
      Tag: r22a2-branch
	threading.py 
Log Message:
Merge Skip's debug change into branch

Index: threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -C2 -d -r1.14 -r1.14.2.1
*** threading.py	2001/08/13 14:40:29	1.14
--- threading.py	2001/08/19 04:41:49	1.14.2.1
***************
*** 262,268 ****
--- 262,274 ----
              if not blocking:
                  break
+             if __debug__:
+                 self._note("%s.acquire(%s): blocked waiting, value=%s",
+                            self, blocking, self.__value)
              self.__cond.wait()
          else:
              self.__value = self.__value - 1
+             if __debug__:
+                 self._note("%s.acquire: success, value=%s(%s)",
+                            self, self.__value, self.__initial_value)
              rc = 1
          self.__cond.release()
***************
*** 272,275 ****
--- 278,284 ----
          self.__cond.acquire()
          self.__value = self.__value + 1
+         if __debug__:
+             self._note("%s.release: success, value=%s(%s)",
+                        self, self.__value, self.__initial_value)
          self.__cond.notify()
          self.__cond.release()