8000 bpo-37421: test_concurrent_futures stops ForkServer (GH-14643) (GH-14… · python/cpython@cdada40 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit cdada40

Browse files
bpo-37421: test_concurrent_futures stops ForkServer (GH-14643) (GH-14645)
test_concurrent_futures now explicitly stops the ForkServer instance if it's running. (cherry picked from commit e676244) Co-authored-by: Victor Stinner <vstinner@redhat.com>
1 parent 66905d1 commit cdada40

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Lib/test/test_concurrent_futures.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,9 @@ def tearDownModule():
13101310

13111311
# cleanup multiprocessing
13121312
multiprocessing.process._cleanup()
1313+
# Stop the ForkServer process if it's running
1314+
from multiprocessing import forkserver
1315+
forkserver._forkserver._stop()
13131316
# bpo-37421: Explicitly call _run_finalizers() to remove immediately
13141317
# temporary directories created by multiprocessing.util.get_temp_dir().
13151318
multiprocessing.util._run_finalizers()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test_concurrent_futures now explicitly stops the ForkServer instance if it's
2+
running.

0 commit comments

Comments
 (0)
0