Skip to content

Commit

Permalink
pythongh-113205: test_multiprocessing.test_terminate: Give tasks a ch…
Browse files Browse the repository at this point in the history
…ance to start (pythonGH-114249)

(cherry picked from commit ce75b4c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
serhiy-storchaka authored and miss-islington committed Jan 24, 2024
1 parent 018b637 commit 1ef99a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2704,6 +2704,7 @@ def test_terminate(self):
p = self.Pool(3)
args = [sleep_time for i in range(10_000)]
result = p.map_async(time.sleep, args, chunksize=1)
time.sleep(0.2) # give some tasks a chance to start
p.terminate()
p.join()

Expand Down

0 comments on commit 1ef99a6

Please sign in to comment.