In a program I am writing, I instantiate a series of randomly timed callbacks with add_periodic_callback(callback, random.random() * 150 ). Then, later, when a button is pushed I want to stop the periodic callbacks. I use something like this:
where the stop_callbacks callback, is just
Unfortunately, this stop_callbacks callback only seems to work and stop the callbacks 1 every 3-4 times. It’s strange behavior. Can anyone help me out with this problem?