这里是我的代码:龙卷风异步请求不起作用,我的代码有什么问题?
class AsyncTestHandler(BaseHandler):
def testTimeOut(self, callback):
time.sleep(20)
callback("ok")
@tornado.web.asynchronous
def post(self):
user = self.get_current_user()
self.testTimeOut(callback=self.respones)
def respones(self,msg):
self.finish(msg)
我曾用“@ tornado.web.asynchronous”有回调,但要求是不同步的,怎么能ID?
的可能重复[如何在龙卷风长轮询工作?](http://stackoverflow.com/questions/16428231/how-does-long-polling-work-in-tornado) – dano