好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Tornado协程在python2.7是怎么使用的?

错误写法

class RemoteHandler(web.RequestHandler):

    @gen.coroutine
    def get(self):
        response = httpclient('http://HdhCmsTestbaidu测试数据')
        self.write(response.body)

    @gen.coroutine
    def httpClient(url):
        result = yield httpclient.AsyncHTTPClient().fetch(url)
        return result 

查看更多关于Tornado协程在python2.7是怎么使用的?的详细内容...

  阅读:46次