Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quitting multiple threads
#1
Hi there.

I'm looking into thread.interrupt_main() as a way to exit a thread and close an app irrespective of other threads running.

But, if I've started my app off with:
threads=[threading.Thread(target=func) for func in [ThreadOne, ThreadTwo$
[th.start() for th in threads]
[th.join() for th in threads]

Where does the keyboard handling code go? I don't have a loop anywhere in the main thread anymore?

Many thanks.
Reply


Messages In This Thread
Quitting multiple threads - by MuntyScruntfundle - Oct-16-2018, 09:14 PM
RE: Quitting multiple threads - by nilamo - Oct-16-2018, 09:31 PM
RE: Quitting multiple threads - by DeaD_EyE - Oct-16-2018, 10:30 PM
RE: Quitting multiple threads - by volcano63 - Oct-17-2018, 05:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to separate a loop across multiple threads stylingpat 0 1,692 May-05-2021, 05:21 PM
Last Post: stylingpat
  Get average of multiple threads Contra_Boy 1 17,148 May-05-2020, 04:51 PM
Last Post: deanhystad
  stop multiple threads jeuvrey 5 3,423 Nov-15-2018, 01:34 PM
Last Post: jeuvrey
  How to run multiple threads properly cyberion1985 6 5,885 Dec-29-2017, 09:45 AM
Last Post: cyberion1985

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020