From 5e77e448bd7c77a4575da46ad3103ae61ba8df26 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 12 Feb 2019 16:00:07 +0100 Subject: [PATCH] add an additional case for idle ThreadPoolExecutor threads this is what they look like in Python 3.7 --- jupyterhub/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jupyterhub/utils.py b/jupyterhub/utils.py index 2739d261..c00eda88 100644 --- a/jupyterhub/utils.py +++ b/jupyterhub/utils.py @@ -437,6 +437,9 @@ def print_stacks(file=sys.stderr): if ( last_frame[0].endswith('threading.py') and last_frame[-1] == 'waiter.acquire()' + ) or ( + last_frame[0].endswith('thread.py') + and last_frame[-1].endswith('work_queue.get(block=True)') ): # thread is waiting on a condition # call it idle rather than showing the uninteresting stack