Author: Armin Rigo <[email protected]>
Branch:
Changeset: r69412:570e6baf64ae
Date: 2014-02-25 10:19 +0100
http://bitbucket.org/pypy/pypy/changeset/570e6baf64ae/
Log: Baaah. _py3k_acquire() will raise OverflowError. Work around.
diff --git a/lib-python/2.7/threading.py b/lib-python/2.7/threading.py
--- a/lib-python/2.7/threading.py
+++ b/lib-python/2.7/threading.py
@@ -246,7 +246,14 @@
else:
# PyPy patch: use _py3k_acquire()
if timeout > 0:
- gotit = waiter._py3k_acquire(True, timeout)
+ try:
+ gotit = waiter._py3k_acquire(True, timeout)
+ except OverflowError:
+ # bah, in Python 3, acquire(True, timeout) raises
+ # OverflowError if the timeout is too huge. For
+ # forward-compatibility reasons we do the same.
+ waiter.acquire()
+ gotit = True
else:
gotit = waiter.acquire(False)
if not gotit:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit