diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-01-24 07:46:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 07:46:27 (GMT) |
commit | 03f8f77885cd1bf802cc8945dfdb308772c471ac (patch) | |
tree | e4c2d311372a051708b316b88a3f1f949c27ceed | |
parent | 0c42897f8d3bf0fbd4d10463a0628d6074efa7e6 (diff) | |
download | cpython-03f8f77885cd1bf802cc8945dfdb308772c471ac.zip cpython-03f8f77885cd1bf802cc8945dfdb308772c471ac.tar.gz cpython-03f8f77885cd1bf802cc8945dfdb308772c471ac.tar.bz2 |
[3.12] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start (GH-114249) (GH-114516)
(cherry picked from commit ce75b4c26d18dcd840fd2e7ee362a84209648d06)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 4cadefe..e42c7ab 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -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() |