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

Method multipass

Lib/test/_test_multiprocessing.py:2278–2292  ·  view source on GitHub ↗
(cls, barrier, results, n)

Source from the content-addressed store, hash-verified

2276
2277 @classmethod
2278 def multipass(cls, barrier, results, n):
2279 m = barrier.parties
2280 assert m == cls.N
2281 for i in range(n):
2282 results[0].append(True)
2283 assert len(results[1]) == i * m
2284 barrier.wait()
2285 results[1].append(True)
2286 assert len(results[0]) == (i + 1) * m
2287 barrier.wait()
2288 try:
2289 assert barrier.n_waiting == 0
2290 except NotImplementedError:
2291 pass
2292 assert not barrier.broken
2293
2294 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
2295 def test_barrier(self, passes=1):

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected