MCPcopy Index your code
hub / github.com/python/cpython / _cleanup_tests

Function _cleanup_tests

Lib/multiprocessing/util.py:538–560  ·  view source on GitHub ↗

Cleanup multiprocessing resources when multiprocessing tests completed.

()

Source from the content-addressed store, hash-verified

536
537
538def _cleanup_tests():
539 """Cleanup multiprocessing resources when multiprocessing tests
540 completed."""
541
542 from test import support
543
544 # cleanup multiprocessing
545 process._cleanup()
546
547 # Stop the ForkServer process if it's running
548 from multiprocessing import forkserver
549 forkserver._forkserver._stop()
550
551 # Stop the ResourceTracker process if it's running
552 from multiprocessing import resource_tracker
553 resource_tracker._resource_tracker._stop()
554
555 # bpo-37421: Explicitly call _run_finalizers() to remove immediately
556 # temporary directories created by multiprocessing.util.get_temp_dir().
557 _run_finalizers()
558 support.gc_collect()
559
560 support.reap_children()

Callers

nothing calls this directly

Calls 3

_run_finalizersFunction · 0.85
_cleanupMethod · 0.45
_stopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…