forked from openlp/openlp
Go back to the way I was doing it originally. Much more succint.
This commit is contained in:
parent
11f528d09c
commit
9e184ebbfd
@ -91,11 +91,8 @@ def is_thread_finished(thread_name):
|
|||||||
:param str thread_name: The name of the thread
|
:param str thread_name: The name of the thread
|
||||||
:returns: True if the thread is finished, False if it is still running
|
:returns: True if the thread is finished, False if it is still running
|
||||||
"""
|
"""
|
||||||
thread_info = Registry().get('application').worker_threads.get(thread_name)
|
app = Registry().get('application')
|
||||||
if not thread_info:
|
return thread_name not in app.worker_threads or app.worker_threads[thread_name]['thread'].isFinished()
|
||||||
# If the thread doesnt exist anymore, it's probably because it is finished
|
|
||||||
return True
|
|
||||||
return thread_info['thread'].isFinished()
|
|
||||||
|
|
||||||
|
|
||||||
def make_remove_thread(thread_name):
|
def make_remove_thread(thread_name):
|
||||||
|
Loading…
Reference in New Issue
Block a user