Skip to content

Commit d41e9e0

Browse files
committed
More explanation :P
1 parent b5d1f0a commit d41e9e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/asyncio/locks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ def _wake_up_first(self):
224224
except StopIteration:
225225
return
226226

227+
# .done() necessarily means that a waiter will wake up later on and
228+
# either take the lock, or, if it was cancelled and lock wasn't
229+
# taken already, will hit this again and wake up a new waiter.
227230
if not fut.done():
228231
fut.set_result(True)
229232

0 commit comments

Comments
 (0)