MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

Lib/asyncio/locks.py:485–494  ·  view source on GitHub ↗

Create a barrier, initialised to 'parties' tasks.

(self, parties)

Source from the content-addressed store, hash-verified

483 """
484
485 def __init__(self, parties):
486 """Create a barrier, initialised to 'parties' tasks."""
487 if parties < 1:
488 raise ValueError('parties must be >= 1')
489
490 self._cond = Condition() # notify all tasks when state changes
491
492 self._parties = parties
493 self._state = _BarrierState.FILLING
494 self._count = 0 # count tasks in Barrier
495
496 def __repr__(self):
497 res = super().__repr__()

Callers

nothing calls this directly

Calls 1

ConditionClass · 0.70

Tested by

no test coverage detected