【发布时间】:2014-08-01 14:59:35
【问题描述】:
我有一个调用异步函数的异步龙卷风服务器。但是,该函数只是进行一些后台处理,我不想等待它完成。我怎样才能做到这一点?这是我所拥有的示例:
@gen.coroutine
def get(self):
yield self.process('data') # I don't want to wait here
self.write('page')
@gen.coroutine
def process(self, arg):
d = yield gen.Task(self.otherFunc, arg)
raise gen.Return(None)
【问题讨论】:
标签: python asynchronous tornado