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

Function RLock

Lib/threading.py:126–137  ·  view source on GitHub ↗

Factory function that returns a new reentrant lock. A reentrant lock must be released by the thread that acquired it. Once a thread has acquired a reentrant lock, the same thread may acquire it again without blocking; the thread must release it once for each time it has acquired it.

()

Source from the content-addressed store, hash-verified

124Lock = _LockType
125
126def RLock():
127 """Factory function that returns a new reentrant lock.
128
129 A reentrant lock must be released by the thread that acquired it. Once a
130 thread has acquired a reentrant lock, the same thread may acquire it again
131 without blocking; the thread must release it once for each time it has
132 acquired it.
133
134 """
135 if _CRLock is None:
136 return _PyRLock()
137 return _CRLock()
138
139class _RLock:
140 """This class implements reentrant lock objects.

Callers 8

__init__Method · 0.90
__init__Method · 0.90
__new__Method · 0.90
NonCallableMockClass · 0.90
_lru_cache_wrapperFunction · 0.70
__init__Method · 0.70
threading.pyFile · 0.70
_after_forkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…