]> granicus.if.org Git - python/commitdiff
Support new Condition return value in the multiprocessing version.
authorGeorg Brandl <georg@python.org>
Thu, 28 Oct 2010 13:01:06 +0000 (13:01 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 28 Oct 2010 13:01:06 +0000 (13:01 +0000)
Lib/multiprocessing/synchronize.py

index 7f4718c8472b90756ed4478850700aecc529bcc7..edf6c3e02d2870205a7a3131cbd9c8a24854bde0 100644 (file)
@@ -217,7 +217,7 @@ class Condition(object):
 
         try:
             # wait for notification or timeout
-            self._wait_semaphore.acquire(True, timeout)
+            ret = self._wait_semaphore.acquire(True, timeout)
         finally:
             # indicate that this thread has woken
             self._woken_count.release()
@@ -225,6 +225,7 @@ class Condition(object):
             # reacquire lock
             for i in range(count):
                 self._lock.acquire()
+            return ret
 
     def notify(self):
         assert self._lock._semlock._is_mine(), 'lock is not owned'