mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
[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:
parent
0c42897f8d
commit
03f8f77885
1 changed files with 1 additions and 0 deletions
|
@ -2705,6 +2705,7 @@ class _TestPool(BaseTestCase):
|
||||||
p = self.Pool(3)
|
p = self.Pool(3)
|
||||||
args = [sleep_time for i in range(10_000)]
|
args = [sleep_time for i in range(10_000)]
|
||||||
result = p.map_async(time.sleep, args, chunksize=1)
|
result = p.map_async(time.sleep, args, chunksize=1)
|
||||||
|
time.sleep(0.2) # give some tasks a chance to start
|
||||||
p.terminate()
|
p.terminate()
|
||||||
p.join()
|
p.join()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue