mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)
multiprocessing tests now stop the ForkServer instance if it's running: close the "alive" file descriptor to ask the server to stop and then remove its UNIX address.
This commit is contained in:
parent
0d722f3cd6
commit
8fbeb14312
3 changed files with 28 additions and 0 deletions
|
@ -5650,7 +5650,13 @@ def install_tests_in_module_dict(remote_globs, start_method):
|
|||
# Sleep 500 ms to give time to child processes to complete.
|
||||
if need_sleep:
|
||||
time.sleep(0.5)
|
||||
|
||||
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue