华子的代码空间

逆水行舟,不进则退。 关注系统编程、网络编程、并发、分布式。

2012年12月10日

tornado的gen.engine浅析

摘要: 1. 首先看看示例代码,也是官方给出的: 1 class Main(RequestHandler): 2 @tornado.web.asynchronous 3 @gen.engine 4 def get(self): 5 if _DEBUG: 6 pdb.set_trace() 7 http_client = AsyncHTTPClient() 8 response = yield gen.Task(http_client.fetch, "http://code.rootk.com") 9 ... 阅读全文

posted @ 2012-12-10 22:48 华子的代码空间 阅读(2624) 评论(0) 推荐(1) 编辑

导航