MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __init__

Method __init__

tools/python-3.11.9-amd64/Lib/threading.py:429–433  ·  view source on GitHub ↗
(self, value=1)

Source from the content-addressed store, hash-verified

427 # After Tim Peters' semaphore class, but not quite the same (no maximum)
428
429 def __init__(self, value=1):
430 if value < 0:
431 raise ValueError("semaphore initial value must be >= 0")
432 self._cond = Condition(Lock())
433 self._value = value
434
435 def __repr__(self):
436 cls = self.__class__

Callers

nothing calls this directly

Calls 2

ConditionClass · 0.70
LockClass · 0.50

Tested by

no test coverage detected