[pypy-commit] pypy py3k: Add an XXX about acquire_timed(), which was fixed (in 'default')

arigo noreply at buildbot.pypy.org
Thu Jan 31 17:40:08 CET 2013


Author: Armin Rigo <arigo at tunes.org>
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


More information about the pypy-commit mailing list