Compacted thread startup

This commit is contained in:
MikeTheWatchGuy 2019-03-02 14:32:20 -05:00
parent 35f5958c4c
commit 30342b7bea
1 changed files with 2 additions and 4 deletions

View File

@ -63,9 +63,7 @@ if __name__ == '__main__':
#-- Create a Queue to communicate with GUI --
gui_queue = Queue() # queue used to communicate between the gui and the worker
#-- Start worker threads, one runs twice as often as the other
thread = Thread(target=worker_thread, args=('Thread 1', 1000, gui_queue,), daemon=True)
thread.start()
thread = Thread(target=worker_thread, args=('Thread 2', 500, gui_queue,), daemon=True)
thread.start()
Thread(target=worker_thread, args=('Thread 1', 1000, gui_queue,), daemon=True).start()
Thread(target=worker_thread, args=('Thread 2', 500, gui_queue,), daemon=True).start()
#-- Start the GUI passing in the Queue --
the_gui(gui_queue)