X-Git-Url: http://git.datanom.net/flask-test.git/blobdiff_plain/db4f0ba9d4aec596f179335f1d86b3dd2bb206c6..163c4d87c8cefd45e8c8836daa28c53956be1e1a:/app/decorators.py diff --git a/app/decorators.py b/app/decorators.py new file mode 100644 index 0000000..cfdbd08 --- /dev/null +++ b/app/decorators.py @@ -0,0 +1,7 @@ +from threading import Thread + +def async(f): + def wrapper(*args, **kwargs): + thr = Thread(target=f, args=args, kwargs=kwargs) + thr.start() + return wrapper