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

Method _get_loop

pymongo/_asyncio_lock.py:20–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 _loop = None
19
20 def _get_loop(self) -> Any:
21 loop = events._get_running_loop()
22
23 if self._loop is None:
24 with _global_lock:
25 if self._loop is None:
26 self._loop = loop
27 if loop is not self._loop:
28 raise RuntimeError(f"{self!r} is bound to a different event loop")
29 return loop
30
31
32class _ContextManagerMixin:

Callers 2

acquireMethod · 0.80
waitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected