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

Method test_barrier

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

Source from the content-addressed store, hash-verified

374class BarrierTest(BasicThreadTest):
375
376 def test_barrier(self):
377 with threading_helper.wait_threads_exit():
378 self.bar = Barrier(NUMTASKS)
379 self.running = NUMTASKS
380 for i in range(NUMTASKS):
381 thread.start_new_thread(self.task2, (i,))
382 verbose_print("waiting for tasks to end")
383 self.done_mutex.acquire()
384 verbose_print("tasks done")
385
386 def task2(self, ident):
387 for i in range(NUMTRIPS):

Callers

nothing calls this directly

Calls 3

BarrierClass · 0.70
verbose_printFunction · 0.70
acquireMethod · 0.45

Tested by

no test coverage detected