mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Merge 3.5 (issue #22970)
This commit is contained in:
commit
d35bf03284
2 changed files with 32 additions and 1 deletions
|
|
@ -329,7 +329,13 @@ class Condition(_ContextManagerMixin):
|
|||
self._waiters.remove(fut)
|
||||
|
||||
finally:
|
||||
yield from self.acquire()
|
||||
# Must reacquire lock even if wait is cancelled
|
||||
while True:
|
||||
try:
|
||||
yield from self.acquire()
|
||||
break
|
||||
except futures.CancelledError:
|
||||
pass
|
||||
|
||||
@coroutine
|
||||
def wait_for(self, predicate):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue