def decorator(*args, **kwargs): reactor = Broker.get_instance().reactor return run_in_reactor(reactor)(fn)(*args, **kwargs)
def run_in_threaded_reactor(fn): """ Decorator to run the decorated function in the threaded reactor. """ return run_in_reactor(THREADED_REACTOR)(fn)