I am running a Flask webserver that uses a get request to change the colors of an led strip. However, one of the light sequences requires me to run a loop that can only be changed with another get request . Ive tried everything that I could think of but I'm at a loss.
Things I've Tried: Updating global variables with following request that are conditioned to end the loop: Causes memory leaks and does not function.
Creating a separate sub process of the loop by itself in python: I can start the process but .kill(), .terminate(), and proccess.call(["kill",proccess.pid]) cant kill it.(even with the subsequent p.wait())
multiprocessing with python: None of the functions given can kill the execution
Any Help is appreciated Thanks in advance Ps: sorry if this is a bad question relatively new to stackOverflow