Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion asyncio/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def acquire(self):
This method blocks until the lock is unlocked, then sets it to
locked and returns True.
"""
if not self._waiters and not self._locked:
if not self._locked and all(w.cancelled() for w in self._waiters):
self._locked = True
return True

Expand Down