summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim@python.org>2013-10-09 02:51:06 (GMT)
committerTim Peters <tim@python.org>2013-10-09 02:51:06 (GMT)
commitb563d4b7c8594f6b814f418c97d6774d5a8a5ef0 (patch)
treec6472126e5baa53574cd67530729ddb08958f232
parent641d6217a839f42ccac6478ff7272dfef5c807e4 (diff)
downloadcpython-b563d4b7c8594f6b814f418c97d6774d5a8a5ef0.zip
cpython-b563d4b7c8594f6b814f418c97d6774d5a8a5ef0.tar.gz
cpython-b563d4b7c8594f6b814f418c97d6774d5a8a5ef0.tar.bz2
LOL - 2.7 requires very different code. Annoying ;-)
-rw-r--r--Lib/threading.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 167f8c7..e81471b 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -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):