Commit 4bcb6d1c authored by Stefan Behnel's avatar Stefan Behnel

Ignore test time-stamper thread when checking for thread termination.

parent 5286c06e
...@@ -1827,7 +1827,7 @@ def check_thread_termination(ignore_seen=True): ...@@ -1827,7 +1827,7 @@ def check_thread_termination(ignore_seen=True):
current = threading.currentThread() current = threading.currentThread()
blocking_threads = [] blocking_threads = []
for t in threading.enumerate(): 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 continue
t.join(timeout=2) t.join(timeout=2)
if t.isAlive(): if t.isAlive():
...@@ -2104,7 +2104,7 @@ def time_stamper_thread(interval=10): ...@@ -2104,7 +2104,7 @@ def time_stamper_thread(interval=10):
sleep(1./4) sleep(1./4)
write('\n#### %s\n' % now()) write('\n#### %s\n' % now())
thread = threading.Thread(target=time_stamper) thread = threading.Thread(target=time_stamper, name='time_stamper', daemon=True)
thread.start() thread.start()
try: try:
yield yield
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment