From ce35e5afe7f50e0fa79f3dc216e776696602b347 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 18 Jan 2024 16:52:23 +0200 Subject: [PATCH] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start --- Lib/test/_test_multiprocessing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 6a050fa541db1e..c0d3ca50f17d69 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -2705,6 +2705,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()