9
I need a function similar to gobject.io_add_watch but for a variable. For example it needs to watch the variable stop initialized to stop = False and when stop is changed to True it must call a function. I can't have a separate thread watching the variable in a loop with a time.sleep.
Is there such a function or a way to do that ?