How to implement a Mutex in Python when using Gtk with PyGTK
- by Julian
Hi, I have an application that starts several threads using
gobject.timeout_add(delay, function)
Now in my function I want to test and set on some variable, e.g.
def function(self):
if flag == True:
flag = False
doSomething()
Now to make this threadsafe, I would have to lock the function using some mutex lock.
Is this possible with Gtk? Or can I use the Python Lock objects from threading?