Skip to content

Instantly share code, notes, and snippets.

@HJulio
Last active September 16, 2016 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HJulio/d7bc75bf50ba73988e56e93885d13c8f to your computer and use it in GitHub Desktop.
Save HJulio/d7bc75bf50ba73988e56e93885d13c8f to your computer and use it in GitHub Desktop.
asycn flask decorator
#@async
from threading import Thread
def async(f):
def wrapper(*args, **kwargs):
thr = Thread(target=f, args=args, kwargs=kwargs)
thr.start()
return wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment