mirror of
https://github.com/python/cpython.git
synced 2025-11-26 21:33:10 +00:00
gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start (GH-114249)
This commit is contained in:
parent
82cd8fee31
commit
ce75b4c26d
1 changed files with 1 additions and 0 deletions
|
|
@ -2705,6 +2705,7 @@ class _TestPool(BaseTestCase):
|
||||||
p = self.Pool(3)
|
p = self.Pool(3)
|
||||||
args = [sleep_time for i in range(10_000)]
|
args = [sleep_time for i in range(10_000)]
|
||||||
result = p.map_async(time.sleep, args, chunksize=1)
|
result = p.map_async(time.sleep, args, chunksize=1)
|
||||||
|
time.sleep(0.2) # give some tasks a chance to start
|
||||||
p.terminate()
|
p.terminate()
|
||||||
p.join()
|
p.join()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue