import threading


def background(f):
    """Threading decorator.
    
    Use @background above the function you want to thread (run in the
    background)."""
    def bg_f(*a, **kw):
        thread = threading.Thread(name=f.__name__, target=f, args=a, kwargs=kw)
        thread.start()
        return thread
    return bg_f