You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
In tornado.concurrent there is nice decorator return_future, which allows to return Future if callback argument is None. With this decorator it is possible to use modern api: yield f(a, b) and yield gen.Task(f, a, b) for backward compatibility.
I am not sure about pipelining but for simple commands works perfectly fine:
for i in dir(tornadoredis.Client):
if not i.startswith("") and i not in (
"connect",
"encode",
"listen",
"auth",
"process_data",
"format_reply",
) and not i.startswith("on") and not i.endswith("_command"):
attr = getattr(tornadoredis.Client,i)
if inspect.isfunction(attr):
setattr(tornadoredis.Client,i,return_future(attr))
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In
tornado.concurrent
there is nice decoratorreturn_future
, which allows to returnFuture
if callback argument is None. With this decorator it is possible to use modern api:yield f(a, b)
andyield gen.Task(f, a, b)
for backward compatibility.I am not sure about pipelining but for simple commands works perfectly fine:
and here simple test:
What do you think about decorating all commands with
return_future
?The text was updated successfully, but these errors were encountered: