0

I am creating a downloader app in python using tkinter and urllib.request and I have used thread to divide it into two parts(one responsible for the main app usage and the other responsible to use the information in the main app and via urllib.request download the file mentioned) and I want to terminate the thread whenever the user hits a specific button(to work as a cancel button), so is there a way to do kill a thread or should I use multi-processing instead?

Omid Ki
  • 155
  • 3
  • 13
  • Does this answers your doubt https://stackoverflow.com/questions/323972/is-there-any-way-to-kill-a-thread – Asnim P Ansari Apr 19 '20 at 17:14
  • You should ask: *is there a way to break a `urllib.request`?* – stovfl Apr 19 '20 at 18:15
  • Breaking the urllib.request was my initial thought but there were issues with the program that I had to turn it into a thread and I am happy with it but I want to end the thread with a button so that it would work as a cancel button.(Actually, if you have a way to break the urllib.request I would appreciate it if you tell me.) – Omid Ki Apr 20 '20 at 10:43

0 Answers0