hack to stop ThreadPoolExecutor blocking exit

This commit is contained in:
Michael Hudson-Doyle 2018-05-18 14:33:07 +12:00
parent bdf2bd35a7
commit 384dadc5ed
1 changed files with 6 additions and 0 deletions

View File

@ -414,3 +414,9 @@ class Application:
except: except:
log.exception("Exception in controller.run():") log.exception("Exception in controller.run():")
raise raise
finally:
# concurrent.futures.ThreadPoolExecutor tries to join all
# threads before exiting. We don't want that and this
# ghastly hack prevents it.
from concurrent.futures import thread
thread._threads_queues = {}