Merge "Fix Calling waiters.wait_for_any() blocks if future has called Condition.wait()"

This commit is contained in:
Zuul 2019-11-13 18:51:35 +00:00 committed by Gerrit Code Review
commit 491da9c019
1 changed files with 4 additions and 2 deletions

View File

@ -187,7 +187,8 @@ def _wait_for_all_green(fs, timeout=None):
len(not_done))
waiter.event.wait(timeout)
for f in not_done:
f._waiters.remove(waiter)
with f._condition:
f._waiters.remove(waiter)
with _acquire_and_release_futures(fs):
done, not_done = _partition_futures(fs)
@ -207,7 +208,8 @@ def _wait_for_any_green(fs, timeout=None):
waiter.event.wait(timeout)
for f in fs:
f._waiters.remove(waiter)
with f._condition:
f._waiters.remove(waiter)
with _acquire_and_release_futures(fs):
done, not_done = _partition_futures(fs)