Introduction
============

I have been made some script with threading inside of it to kill exe's for certain amount of time. The threading seems working fine but when im going to close the script, it freezes. My script has a "button" to execute and exit using TKinter

Problematic
===========

The script become freezes and the thread stil going on the background. The thread contain loops for 30-60 seconds (killing exe's). It seems the script cant close properly because of the thread still going on and on.

Here's the thread class :

```
# Global Variable #
runBroke='taskkill /F /im RuntimeBroker.exe'

#Thread  Class #
    class Killizer(object):
        def __init__(self):
            self.thread1 = None
            self.stop_threads = Event()

        def killer(self):
            while not self.stop_threads.is_set():
                def kill():
                    os.system(runBroke)
                    timer()
                def timer():
                    time.sleep(60)
                    kill()
                kill()

        def exe(self):
            self.stop_threads.clear()
            self.thread1 = Thread(target = self.killer)
            self.thread1.start()

        def shut(self):
            self.stop_threads.set()
            self.thread1.join()
            self.thread1 = None

```

How to properly close or enforce to exit that thread using TKinter Button?