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

Method wait

test/asynchronous/test_load_balancer.py:178–186  ·  view source on GitHub ↗
(self, event: Event, timeout: int)

Source from the content-addressed store, hash-verified

176 raise Exception("timed out waiting for unlock signal: deadlock?")
177
178 async def wait(self, event: Event, timeout: int):
179 if _IS_SYNC:
180 return event.wait(timeout) # type: ignore[call-arg]
181 else:
182 try:
183 await asyncio.wait_for(event.wait(), timeout=timeout)
184 except asyncio.TimeoutError:
185 return False
186 return True
187
188
189if __name__ == "__main__":

Callers 14

_test_no_gc_deadlockMethod · 0.95
test_session_gcMethod · 0.95
lock_poolMethod · 0.95
c1Method · 0.45
c2Method · 0.45
c3Method · 0.45
test_wait_cancelMethod · 0.45
wait_on_condMethod · 0.45
test_wait_unacquiredMethod · 0.45
test_timeout_in_blockMethod · 0.45

Calls 1

wait_forMethod · 0.80

Tested by

no test coverage detected