]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 24 Jan 2024 07:46:27 +0000 (08:46 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Jan 2024 07:46:27 +0000 (07:46 +0000)
(cherry picked from commit ce75b4c26d18dcd840fd2e7ee362a84209648d06)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/_test_multiprocessing.py

index 4cadefe40af71ebc027dcafdf8667b727ddf0697..e42c7ab4bde9af383edfa8dab087590b668eaa9c 100644 (file)
@@ -2705,6 +2705,7 @@ class _TestPool(BaseTestCase):
         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()