I\'m trying to stop a running function from another function. I know you can use a global variable but from the reading I\'ve done its bad practice to make variables global