Author: Remi Meier <[email protected]>
Branch:
Changeset: r269:5ccc3f08f3bd
Date: 2014-07-22 14:00 +0200
http://bitbucket.org/pypy/benchmarks/changeset/5ccc3f08f3bd/
Log: minor optimisation
diff --git a/multithread/common/abstract_threading.py
b/multithread/common/abstract_threading.py
--- a/multithread/common/abstract_threading.py
+++ b/multithread/common/abstract_threading.py
@@ -156,9 +156,10 @@
def __call__(self):
- with self._cond:
- while not self._done:
- self._cond.wait()
+ if not self._done:
+ with self._cond:
+ while not self._done:
+ self._cond.wait()
if self._exception:
raise self._exception
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit