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

Class BoundedSemaphore

Lib/multiprocessing/synchronize.py:156–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154#
155
156class BoundedSemaphore(Semaphore):
157
158 def __init__(self, value=1, *, ctx):
159 SemLock.__init__(self, SEMAPHORE, value, value, ctx=ctx)
160
161 def __repr__(self):
162 try:
163 value = self.get_value()
164 except Exception:
165 value = 'unknown'
166 return '<%s(value=%s, maxvalue=%s)>' % \
167 (self.__class__.__name__, value, self._semlock.maxvalue)
168
169#
170# Non-recursive lock

Callers 1

BoundedSemaphoreMethod · 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…