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

Method lock_pool

test/asynchronous/test_load_balancer.py:170–176  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

168 self.unlock = create_async_event()
169
170 async def lock_pool(self):
171 async with self.pool.lock:
172 self.locked.set()
173 # Wait for the unlock flag.
174 unlock_pool = await self.wait(self.unlock, 10)
175 if not unlock_pool:
176 raise Exception("timed out waiting for unlock signal: deadlock?")
177
178 async def wait(self, event: Event, timeout: int):
179 if _IS_SYNC:

Callers

nothing calls this directly

Calls 2

waitMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected