Author: Armin Rigo <[email protected]>
Branch: stm-thread-2
Changeset: r60786:0c978d2c5fce
Date: 2013-01-31 18:18 +0100
http://bitbucket.org/pypy/pypy/changeset/0c978d2c5fce/

Log:    A clean replacement for 009b40655c5f.

diff --git a/lib_pypy/transaction.py b/lib_pypy/transaction.py
--- a/lib_pypy/transaction.py
+++ b/lib_pypy/transaction.py
@@ -114,7 +114,11 @@
             thread.start_new_thread(self._run_thread, ())
         # now wait.  When we manage to acquire the following lock, then
         # we are finished.
-        self.lock_if_released_then_finished.acquire()
+        try:
+            acquire = self.lock_if_released_then_finished.acquire_interruptible
+        except AttributeError:     # not on pypy-stm
+            acquire = self.lock_if_released_then_finished.acquire
+        acquire()
 
     def teardown(self):
         self.in_transaction = False
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to