Commit 08e66edb authored by Stefan Behnel's avatar Stefan Behnel

Fix deprecated threading API usage in test runner.

parent fe3315ba
...@@ -1913,13 +1913,13 @@ threads_seen = [] ...@@ -1913,13 +1913,13 @@ threads_seen = []
def check_thread_termination(ignore_seen=True): def check_thread_termination(ignore_seen=True):
if threading is None: # no threading enabled in CPython if threading is None: # no threading enabled in CPython
return return
current = threading.currentThread() current = threading.current_thread()
blocking_threads = [] blocking_threads = []
for t in threading.enumerate(): for t in threading.enumerate():
if not t.isAlive() or t == current or t.name == 'time_stamper': if not t.is_alive() or t == current or t.name == 'time_stamper':
continue continue
t.join(timeout=2) t.join(timeout=2)
if t.isAlive(): if t.is_alive():
if not ignore_seen: if not ignore_seen:
blocking_threads.append(t) blocking_threads.append(t)
continue continue
......
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