(func)
return wrapped
Decorator to call a function in a thread and return a deferred with the
    result
Decorator to call a function in a thread and return a deferred with the
    result
Decorator to call a function in a thread and return a deferred with the result
def inthread(func):
    """Decorator to call a function in a thread and return a deferred with the
    result
    """
    @wraps(func)
    def wrapped(*a, **kw):
        return threads.deferToThread(func, *a, **kw)
    return wrapped
def inthread ( func ) : @ wraps ( func ) def wrapped ( * a , * * kw ) : return threads . deferToThread ( func , * a , * * kw ) return wrapped