(self, value=1)
| 462 | # After Tim Peters' semaphore class, but not quite the same (no maximum) |
| 463 | |
| 464 | def __init__(self, value=1): |
| 465 | if value < 0: |
| 466 | raise ValueError("semaphore initial value must be >= 0") |
| 467 | self._cond = Condition(Lock()) |
| 468 | self._value = value |
| 469 | |
| 470 | def __repr__(self): |
| 471 | cls = self.__class__ |