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

Method __init__

pymongo/_asyncio_lock.py:189–199  ·  view source on GitHub ↗
(self, lock: Optional[Lock] = None)

Source from the content-addressed store, hash-verified

187 """
188
189 def __init__(self, lock: Optional[Lock] = None) -> None:
190 if lock is None:
191 lock = Lock()
192
193 self._lock = lock
194 # Export the lock's locked(), acquire() and release() methods.
195 self.locked = lock.locked
196 self.acquire = lock.acquire
197 self.release = lock.release
198
199 self._waiters: collections.deque[Any] = collections.deque()
200
201 def __repr__(self) -> str:
202 res = super().__repr__()

Callers

nothing calls this directly

Calls 1

LockClass · 0.85

Tested by

no test coverage detected