Created
September 4, 2017 10:31
-
-
Save codl/7e05f74e0ce26e67a328a914b1ef4075 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from threading import Thread | |
from functools import wraps | |
def background(fun): | |
@wraps(fun) | |
def wrapper(*args, **kwargs): | |
Thread(target=fun, args=args, kwargs=kwargs).start() | |
return wrapper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment