Skip to content

Commit 2fa4cc5

Browse files
committed
Support new Condition return value in the multiprocessing version.
1 parent 7362c4f commit 2fa4cc5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/multiprocessing/synchronize.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,15 @@ def wait(self, timeout=None):
217217

218218
try:
219219
# wait for notification or timeout
220-
self._wait_semaphore.acquire(True, timeout)
220+
ret = self._wait_semaphore.acquire(True, timeout)
221221
finally:
222222
# indicate that this thread has woken
223223
self._woken_count.release()
224224

225225
# reacquire lock
226226
for i in range(count):
227227
self._lock.acquire()
228+
return ret
228229

229230
def notify(self):
230231
assert self._lock._semlock._is_mine(), 'lock is not owned'

0 commit comments

Comments
 (0)