def end_threads():
 for t in _threadPool:
  t.my_thread_ended = True
  t.join()

def end_threads ( ) : for t in _threadPool : t . my_thread_ended = True t . join ( )
this function must be called once when the gui shuts down .