summaryrefslogtreecommitdiffstats
path: root/Lib/test/_test_multiprocessing.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-05-27 22:10:27 (GMT)
committerGitHub <noreply@github.com>2020-05-27 22:10:27 (GMT)
commite80697d687b610bd7fb9104af905dec8f0bc55a7 (patch)
treec848b98eaec2d959237fda725cf47b059f34b12a /Lib/test/_test_multiprocessing.py
parent7d80b35af1ee03834ae4af83e920dee89c2bc273 (diff)
downloadcpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.zip
cpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.tar.gz
cpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.tar.bz2
bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r--Lib/test/_test_multiprocessing.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 155a827..bbba2b4 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -27,6 +27,7 @@ import test.support
import test.support.script_helper
from test import support
from test.support import socket_helper
+from test.support import threading_helper
# Skip tests if _multiprocessing wasn't built.
@@ -81,7 +82,7 @@ def close_queue(queue):
def join_process(process):
# Since multiprocessing.Process has the same API than threading.Thread
# (join() and is_alive(), the support function can be reused
- support.join_thread(process)
+ threading_helper.join_thread(process)
if os.name == "posix":
@@ -4234,7 +4235,7 @@ class _TestFinalize(BaseTestCase):
gc.set_threshold(5, 5, 5)
threads = [threading.Thread(target=run_finalizers),
threading.Thread(target=make_finalizers)]
- with test.support.start_threads(threads):
+ with threading_helper.start_threads(threads):
time.sleep(4.0) # Wait a bit to trigger race condition
finish = True
if exc is not None: