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

Method __aenter__

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

Source from the content-addressed store, hash-verified

31
32class _ContextManagerMixin:
33 async def __aenter__(self) -> None:
34 await self.acquire() # type: ignore[attr-defined]
35 # We have no use for the "as ..." clause in the with
36 # statement for locks.
37 return
38
39 async def __aexit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
40 self.release() # type: ignore[attr-defined]

Callers

nothing calls this directly

Calls 1

acquireMethod · 0.80

Tested by

no test coverage detected