Depending on what is going on, you can fire off a worker thread and if/when someone changes the parameters, signal the thread to stop processing. Like, have a loop that checks to see if it should stop ...