MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _notify

Method _notify

pymongo/_asyncio_lock.py:293–301  ·  view source on GitHub ↗
(self, n: int)

Source from the content-addressed store, hash-verified

291 self._notify(n)
292
293 def _notify(self, n: int) -> None:
294 idx = 0
295 for fut in self._waiters:
296 if idx >= n:
297 break
298
299 if not fut.done():
300 idx += 1
301 fut.set_result(False)
302
303 def notify_all(self) -> None:
304 """Wake up all tasks waiting on this condition. This method acts

Callers 2

waitMethod · 0.95
notifyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected