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

Method test_barrier

Lib/test/test_thread.py:184–192  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

182class BarrierTest(BasicThreadTest):
183
184 def test_barrier(self):
185 with threading_helper.wait_threads_exit():
186 self.bar = Barrier(NUMTASKS)
187 self.running = NUMTASKS
188 for i in range(NUMTASKS):
189 thread.start_new_thread(self.task2, (i,))
190 verbose_print("waiting for tasks to end")
191 self.done_mutex.acquire()
192 verbose_print("tasks done")
193
194 def task2(self, ident):
195 for i in range(NUMTRIPS):

Callers

nothing calls this directly

Calls 3

verbose_printFunction · 0.85
BarrierClass · 0.70
acquireMethod · 0.45

Tested by

no test coverage detected