Loading cloudcontrol/common/client/utils.py 0 → 100644 +14 −0 Original line number Diff line number Diff line from functools import wraps def main_thread(func): """Decorator for plugin methods that need to be executed in pyev thread. Actually anything that has an attribute `main` that points to an instance of MainLoop. """ @wraps(func) def decorated(self, *args, **kwargs): return self.main.call_in_main_thread(func, self, *args, **kwargs) return decorated Loading
cloudcontrol/common/client/utils.py 0 → 100644 +14 −0 Original line number Diff line number Diff line from functools import wraps def main_thread(func): """Decorator for plugin methods that need to be executed in pyev thread. Actually anything that has an attribute `main` that points to an instance of MainLoop. """ @wraps(func) def decorated(self, *args, **kwargs): return self.main.call_in_main_thread(func, self, *args, **kwargs) return decorated