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

Method test_task_done

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

Source from the content-addressed store, hash-verified

1229 q.task_done()
1230
1231 def test_task_done(self):
1232 queue = self.JoinableQueue()
1233
1234 workers = [self.Process(target=self._test_task_done, args=(queue,))
1235 for i in range(4)]
1236
1237 for p in workers:
1238 p.daemon = True
1239 p.start()
1240
1241 for i in range(10):
1242 queue.put(i)
1243
1244 queue.join()
1245
1246 for p in workers:
1247 queue.put(None)
1248
1249 for p in workers:
1250 p.join()
1251 close_queue(queue)
1252
1253 def test_no_import_lock_contention(self):
1254 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