Line # | Kind | Name | Docs |
---|---|---|---|
29 | Class | AsyncTask | AsyncTask is used to help you perform lengthy tasks without delaying |
89 | Class | GeneratorTask | The diference between this task and AsyncTask is that the 'work_callback' |
126 | Class | GeneratorSubprocessTask | A Generator Task for launching a subprocess |
161 | Function | locked 0 | Call this decorator with the name of the lock. The decorated method |
187 | Function | locked | This is a factory of decorators. The decorator |
216 | Function | gcall | Calls a function, with the given arguments inside Gtk's main loop. |
Example of usage:
import threading class Foo(object): def __init__(self): self.lock = threading.Lock() @locked("lock") def meth1(self): self.critical_value = 1 @locked("lock") def meth2(self): self.critical_value = 2 return self.critical_value
Both 'meth1' and 'meth2' will be wrapped with a 'lock.acquire()' and a 'lock.release()'.