Skip to content

Instantly share code, notes, and snippets.

@mrjoes
Created May 15, 2013 13:44
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 mrjoes/5584098 to your computer and use it in GitHub Desktop.
Save mrjoes/5584098 to your computer and use it in GitHub Desktop.
with gen.task:
@gen.engine
def test():
result = yield gen.Task(somefunc, 10)
print result
without:
def test():
def _handle(result):
print result
somefunc(10, callback=_handle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment