MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/asyncio/locks.py:229–239  ·  view source on GitHub ↗
(self, lock=None)

Source from the content-addressed store, hash-verified

227 """
228
229 def __init__(self, lock=None):
230 if lock is None:
231 lock = Lock()
232
233 self._lock = lock
234 # Export the lock's locked(), acquire() and release() methods.
235 self.locked = lock.locked
236 self.acquire = lock.acquire
237 self.release = lock.release
238
239 self._waiters = collections.deque()
240
241 def __repr__(self):
242 res = super().__repr__()

Callers

nothing calls this directly

Calls 1

LockClass · 0.70

Tested by

no test coverage detected