summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-08-25 15:05:19 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-08-25 15:13:24 +0200
commit4bcb6d1cafdad8c320bb2e7670cddbd03f3cf6af (patch)
tree9c3040bc3391a3d8b81f74ad1527cdad93d77086
parent5286c06ecd374a2a4ee46b4dffb41c5edabfd1eb (diff)
downloadcython-4bcb6d1cafdad8c320bb2e7670cddbd03f3cf6af.tar.gz
Ignore test time-stamper thread when checking for thread termination.
-rwxr-xr-xruntests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtests.py b/runtests.py
index fc7b94da1..0ded11d11 100755
--- a/runtests.py
+++ b/runtests.py
@@ -1827,7 +1827,7 @@ def check_thread_termination(ignore_seen=True):
current = threading.currentThread()
blocking_threads = []
for t in threading.enumerate():
- if not t.isAlive() or t == current:
+ if not t.isAlive() or t == current or t.name == 'time_stamper':
continue
t.join(timeout=2)
if t.isAlive():
@@ -2104,7 +2104,7 @@ def time_stamper_thread(interval=10):
sleep(1./4)
write('\n#### %s\n' % now())
- thread = threading.Thread(target=time_stamper)
+ thread = threading.Thread(target=time_stamper, name='time_stamper', daemon=True)
thread.start()
try:
yield