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

Method test_task_done

Lib/test/_test_multiprocessing.py:1382–1402  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1380
1381 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
1382 def test_task_done(self):
1383 queue = self.JoinableQueue()
1384
1385 workers = [self.Process(target=self._test_task_done, args=(queue,))
1386 for i in range(4)]
1387
1388 for p in workers:
1389 p.daemon = True
1390 p.start()
1391
1392 for i in range(10):
1393 queue.put(i)
1394
1395 queue.join()
1396
1397 for p in workers:
1398 queue.put(None)
1399
1400 for p in workers:
1401 p.join()
1402 close_queue(queue)
1403
1404 def test_no_import_lock_contention(self):
1405 with os_helper.temp_cwd():

Callers

nothing calls this directly

Calls 7

putMethod · 0.95
joinMethod · 0.95
close_queueFunction · 0.85
JoinableQueueMethod · 0.80
ProcessMethod · 0.45
startMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected