Go back to the way I was doing it originally. Much more succint.

This commit is contained in:
Raoul Snyman 2018-01-12 22:59:44 -07:00
parent 11f528d09c
commit 9e184ebbfd
1 changed files with 2 additions and 5 deletions

View File

@ -91,11 +91,8 @@ def is_thread_finished(thread_name):
:param str thread_name: The name of the thread
:returns: True if the thread is finished, False if it is still running
"""
thread_info = Registry().get('application').worker_threads.get(thread_name)
if not thread_info:
# If the thread doesnt exist anymore, it's probably because it is finished
return True
return thread_info['thread'].isFinished()
app = Registry().get('application')
return thread_name not in app.worker_threads or app.worker_threads[thread_name]['thread'].isFinished()
def make_remove_thread(thread_name):