[3.12] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start (GH-114249) (GH-114516)

(cherry picked from commit ce75b4c26d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-01-24 08:46:27 +01:00 committed by GitHub
parent 0c42897f8d
commit 03f8f77885
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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()