]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] 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:26:58 +0000 (08:26 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Jan 2024 07:26:58 +0000 (07:26 +0000)
(cherry picked from commit ce75b4c26d18dcd840fd2e7ee362a84209648d06)

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

index 95ef18958e6378b76db9f23ddb6830bab4b7bd9c..a5c62b9ea645e76cd1e14e917fcee3673875290d 100644 (file)
@@ -2704,6 +2704,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()