bpo-35424: Fix test_multiprocessing_main_handling (GH-11223) (GH-11227)

Fix test_multiprocessing_main_handling: use multiprocessing.Pool with
a context manager and then explicitly join the pool.
(cherry picked from commit 6cdce3ddef805e11d75142f3e20e23c3fe21fdf4)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2 files changed