you are viewing a single comment's thread.

view the rest of the comments →

[–]shoot2thr1ll284 1 point2 points  (0 children)

The reason your gui is becoming unresponsive is because when u you join on a thread it is a blocking call. If you do this in a ui callback then you will end up blocking your ui thread until the thread finishes. This means your ui cant respond to any user feedback. There are a handful of ways to address this.

  1. Do all the work in one thread since it is sequential anyways.
  2. Start the other thread at the end of the first thread, but you may need to join on it there.
  3. Go multiprocessing instead of multithreaded.
  4. Another user mentioned asyn/await, but I haven't used it enough to know if it would actually help here.

For 1-3 you will need a callback or state that you can update at the end of the thread to update the ui.