Method
multipass
(cls, barrier, results, n)
Source from the content-addressed store, hash-verified
| 2072 | |
| 2073 | @classmethod |
| 2074 | def multipass(cls, barrier, results, n): |
| 2075 | m = barrier.parties |
| 2076 | assert m == cls.N |
| 2077 | for i in range(n): |
| 2078 | results[0].append(True) |
| 2079 | assert len(results[1]) == i * m |
| 2080 | barrier.wait() |
| 2081 | results[1].append(True) |
| 2082 | assert len(results[0]) == (i + 1) * m |
| 2083 | barrier.wait() |
| 2084 | try: |
| 2085 | assert barrier.n_waiting == 0 |
| 2086 | except NotImplementedError: |
| 2087 | pass |
| 2088 | assert not barrier.broken |
| 2089 | |
| 2090 | def test_barrier(self, passes=1): |
| 2091 | """ |
Callers
nothing calls this directly
Tested by
no test coverage detected