]> granicus.if.org Git - python/commitdiff
bpo-37421: test_concurrent_futures stops ForkServer (GH-14643)
authorVictor Stinner <vstinner@redhat.com>
Mon, 8 Jul 2019 08:49:11 +0000 (10:49 +0200)
committerGitHub <noreply@github.com>
Mon, 8 Jul 2019 08:49:11 +0000 (10:49 +0200)
test_concurrent_futures now explicitly stops the ForkServer instance
if it's running.

Lib/test/test_concurrent_futures.py
Misc/NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst [new file with mode: 0644]

index c782d4c6e8818462b0604416335720dab4f9fe20..ff9a4938034057887fd75b7cab20b5bef1816311 100644 (file)
@@ -1309,6 +1309,9 @@ def tearDownModule():
 
     # cleanup multiprocessing
     multiprocessing.process._cleanup()
+    # Stop the ForkServer process if it's running
+    from multiprocessing import forkserver
+    forkserver._forkserver._stop()
     # bpo-37421: Explicitly call _run_finalizers() to remove immediately
     # temporary directories created by multiprocessing.util.get_temp_dir().
     multiprocessing.util._run_finalizers()
diff --git a/Misc/NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst b/Misc/NEWS.d/next/Tests/2019-07-08-10-11-36.bpo-37421.OY77go.rst
new file mode 100644 (file)
index 0000000..0766d70
--- /dev/null
@@ -0,0 +1,2 @@
+test_concurrent_futures now explicitly stops the ForkServer instance if it's
+running.