tornado-redis icon indicating copy to clipboard operation
tornado-redis copied to clipboard

Add a support for new simplified generator-based syntax

Open leporo opened this issue 11 years ago • 0 comments

Return Future instances instead of calling callbacks directly.

Add the support for simplified syntax:

@gen.coroutine
def some_method(self):
    ...
    res = yield self.redis_client.get('mykey')
    ...

instead of

@gen.engine
def some_method(self):
    ...
    res = yield gen.Task(self.redis_client.get, 'mykey')
    ...

Benchmark the performance change before merging changes to master.

leporo avatar Sep 09 '13 08:09 leporo