Python Forum
What to do to stop all these threads?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What to do to stop all these threads?
#4
If you stop your whining I'll stop blowing off steam. You've gotten a lot of help from this forum and you know it.

When you signed up with the forum you signed up to follow the rules of the forum. Along side the no profanity and be courteous rules (I occasionally slip up here) are suggestions about how to post questions to the forums. Did you read those? They are good suggestions. If you want to review, they are here:

https://python-forum.io/misc.php?action=help

In particular take a look at "How to ask Smart Questions" and "What to include in a post". Do your posts follow these suggestions? I don't think you've ever posted a runnable example, let alone a small runnable example. If you ask better questions, as described in the forum help, I guarantee you will get better answers.

Back to your question:

I really think that your shutdown problem is caused by your code being a mess. As a beginner, don't know what you are doing, and you took on a substantial task. I am impressed that it works at all. I don't think I could have made that my first python program and got it to work. But the code has grown organically and it has become a mess. It's full of history and unfollowed paths, and it is time to take a step back and review what you have. What parts are needed, and which can be removed. How can the code be restructured to be more understandable?

Why is the KeyListener being run in a thread? Is it because you used to use pynput and that had a listener that blocked? If that was the reason, it is no longer a reason now that you are using keyboard. Or is there some other reason for the thread?

Last week I showed you a way to do the popup window with 1 tkinter root window. The window is withdrawn or deiconified to make it disappear/appear. I also mentioned that tkinter does not like running mainloop outside the main thread. You are making mulitple root windows and some of them outside the main thread. If you clean that up it will get rid of another thread.

The other threads are new to me. Not sure what process does, and I am really curious to see what a lambda thread does. Why are these threads? What do they do?

So, do you want to continue?
Reply


Messages In This Thread
What to do to stop all these threads? - by Valjean - Oct-01-2023, 10:38 PM
RE: What to do to stop all these threads? - by deanhystad - Oct-02-2023, 01:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  stop multiple threads jeuvrey 5 3,438 Nov-15-2018, 01:34 PM
Last Post: jeuvrey

Forum Jump:

User Panel Messages

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