Commits

Armin Rigo  committed 0c978d2

A clean replacement for 009b40655c5f.

  • Participants
  • Parent commits 1a3d866
  • Branches stm-thread-2

Comments (0)

Files changed (1)

File lib_pypy/transaction.py

             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