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

Method __init__

Lib/multiprocessing/synchronize.py:379–386  ·  view source on GitHub ↗
(self, parties, action=None, timeout=None, *, ctx)

Source from the content-addressed store, hash-verified

377class Barrier(threading.Barrier):
378
379 def __init__(self, parties, action=None, timeout=None, *, ctx):
380 import struct
381 from .heap import BufferWrapper
382 wrapper = BufferWrapper(struct.calcsize('i') * 2)
383 cond = ctx.Condition()
384 self.__setstate__((parties, action, timeout, cond, wrapper))
385 self._state = 0
386 self._count = 0
387
388 def __setstate__(self, state):
389 (self._parties, self._action, self._timeout,

Callers

nothing calls this directly

Calls 3

__setstate__Method · 0.95
BufferWrapperClass · 0.85
ConditionMethod · 0.45

Tested by

no test coverage detected