ulauncher.utils.decorator package


ulauncher.utils.decorator.alias module


see https://www.drdobbs.com/web-development/184406073#l9

ulauncher.utils.decorator.debounce module


Decorator that will postpone a functions execution until after wait seconds have elapsed since the last time it was invoked.

ulauncher.utils.decorator.glib_idle_add module

ulauncher.utils.decorator.run_async module

ulauncher.utils.decorator.run_async.run_async(*args, **kwargs)

Function decorator, intended to make “func” run in a new thread (asynchronously).

Return type:threading.Thread


>>> @run_async
>>> def task1():
>>>     do_something
>>> @run_async(daemon=True)
>>> def task2():
>>>     do_something_too
>>> t1 = task1()
>>> t2 = task2()
>>> ...
>>> t1.join()
>>> t2.join()

ulauncher.utils.decorator.singleton module


Decorator function. Call to a decorated function always returns the same instance

Note: it doesn’t take into account args and kwargs when looks up a saved instance Call a decorated function with spawn=True in order to get a new instance

Module contents