Author: Armin Rigo <[email protected]>
Branch: py3k
Changeset: r60777:05832d0ee006
Date: 2013-01-31 17:39 +0100
http://bitbucket.org/pypy/pypy/changeset/05832d0ee006/

Log:    Add an XXX about acquire_timed(), which was fixed (in 'default') to
        return three possible results instead of two.

diff --git a/pypy/module/thread/os_lock.py b/pypy/module/thread/os_lock.py
--- a/pypy/module/thread/os_lock.py
+++ b/pypy/module/thread/os_lock.py
@@ -72,6 +72,7 @@
         microseconds = parse_acquire_args(space, blocking, timeout)
         mylock = self.lock
         result = mylock.acquire_timed(microseconds)
+        result = (result == 1)    # XXX handle RPY_LOCK_INTR (see e80549fefb75)
         return space.newbool(result)
 
     def descr_lock_release(self, space):
@@ -184,6 +185,7 @@
             if not blocking:
                 return space.w_False
             r = self.lock.acquire_timed(microseconds)
+            r = (r == 1)    # XXX handle RPY_LOCK_INTR (see e80549fefb75)
         if r:
             assert self.rlock_count == 0
             self.rlock_owner = tid
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to