let me first start off saying sorry if this is duplicate. a link to the correct thread will be helpful, i just could not find what I was looking for with searching.
I have a python application that checks the status of different things in our network and then writes XML files. It has a constant loop that run through all the checks. Occasionally the application needs to be stopped or restarted to make a change. I don't want to quite the app or restart the app while it is writing a file or executing a task. What are some strategies I can use to terminate the main loop safely? Can I pass something to an object that is running something?