MCPcopy Index your code
hub / github.com/python/cpython / _notify

Method _notify

Lib/asyncio/locks.py:333–341  ·  view source on GitHub ↗
(self, n)

Source from the content-addressed store, hash-verified

331 self._notify(n)
332
333 def _notify(self, n):
334 idx = 0
335 for fut in self._waiters:
336 if idx >= n:
337 break
338
339 if not fut.done():
340 idx += 1
341 fut.set_result(False)
342
343 def notify_all(self):
344 """Wake up all tasks waiting on this condition. This method acts

Callers 2

waitMethod · 0.95
notifyMethod · 0.95

Calls 2

doneMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected