Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b39a314

Browse files
[3.11] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance to start (GH-114249) (GH-114517)
(cherry picked from commit ce75b4c) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 018b637 commit b39a314

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/test/_test_multiprocessing.py

+1
Original file line numberDiff line numberDiff line change
@@ -2704,6 +2704,7 @@ def test_terminate(self):
27042704
p = self.Pool(3)
27052705
args = [sleep_time for i in range(10_000)]
27062706
result = p.map_async(time.sleep, args, chunksize=1)
2707+
time.sleep(0.2) # give some tasks a chance to start
27072708
p.terminate()
27082709
p.join()
27092710

0 commit comments

Comments
 (0)