]> granicus.if.org Git - python/commitdiff
LOL - 2.7 requires very different code. Annoying ;-)
authorTim Peters <tim@python.org>
Wed, 9 Oct 2013 02:51:06 +0000 (21:51 -0500)
committerTim Peters <tim@python.org>
Wed, 9 Oct 2013 02:51:06 +0000 (21:51 -0500)
Lib/threading.py

index 167f8c7fe3164b1d548db2be34458e73196aa1c7..e81471bbb008ae48ff78276ca761a8fea1fb0973 100644 (file)
@@ -531,11 +531,11 @@ class _BoundedSemaphore(_Semaphore):
         raise a ValueError.
 
         """
-        with self._cond:
-            if self._value >= self._initial_value:
+        with self._Semaphore__cond:
+            if self._Semaphore__value >= self._initial_value:
                 raise ValueError("Semaphore released too many times")
-            self._value += 1
-            self._cond.notify()
+            self._Semaphore__value += 1
+            self._Semaphore__cond.notify()
 
 
 def Event(*args, **kwargs):