aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_threadsignals.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_threadsignals.py')
-rw-r--r--Lib/test/test_threadsignals.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_threadsignals.py b/Lib/test/test_threadsignals.py
index eeacd3698cb..15e8078e936 100644
--- a/Lib/test/test_threadsignals.py
+++ b/Lib/test/test_threadsignals.py
@@ -5,6 +5,7 @@ import signal
import os
import sys
from test import support
+from test.support import threading_helper
import _thread as thread
import time
@@ -39,7 +40,7 @@ def send_signals():
class ThreadSignals(unittest.TestCase):
def test_signals(self):
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
# Test signal handling semantics of threads.
# We spawn a thread, have the thread send two signals, and
# wait for it to finish. Check that we got both signals
@@ -129,7 +130,7 @@ class ThreadSignals(unittest.TestCase):
def other_thread():
rlock.acquire()
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
thread.start_new_thread(other_thread, ())
# Wait until we can't acquire it without blocking...
while rlock.acquire(blocking=False):
@@ -165,7 +166,7 @@ class ThreadSignals(unittest.TestCase):
time.sleep(0.5)
lock.release()
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
thread.start_new_thread(other_thread, ())
# Wait until we can't acquire it without blocking...
while lock.acquire(blocking=False):
@@ -212,7 +213,7 @@ class ThreadSignals(unittest.TestCase):
os.kill(process_pid, signal.SIGUSR1)
done.release()
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
# Send the signals from the non-main thread, since the main thread
# is the only one that can process signals.
thread.start_new_thread(send_signals, ())