From: Jimmy <li.jiam...@gmail.com>
Date: Tue, 2 Oct 2012 20:52:52 -0700 (PDT)
Local: Tues, Oct 2 2012 11:52 pm
Subject: Re: How to call tornado asynchronous function right?
I don't mean to put web app to sleep. I just use sleep to simulate some I use the old way (async_callback), which works. But the new way of yield Anything wrong with my code using gen.Task? On Wednesday, October 3, 2012 9:33:33 AM UTC+8, A. Jesse Jiryu Davis wrote: > Do this: > http://emptysquare.net/blog/pausing-with-tornado/ > Tornado isn't magic. If you call sleep(), it'll pause your whole process. > On Tuesday, October 2, 2012 5:51:54 PM UTC-4, aliane abdelouahab wrote: >> look here, maybe it will help: >> http://groups.google.com/group/python-tornado/browse_thread/thread/ae... >> On 2 oct, 11:08, Li jiaming <li.jiam...@gmail.com> wrote: >> > import tornado.ioloop >> > class MainHandler(tornado.web.RequestHandler): >> > class SleepHandler(tornado.web.RequestHandler): >> > def sleep(self, sec, callback): >> > application = tornado.web.Application([ >> > if __name__ == "__main__": >> > *Anything wrong in my code?* >> > I also tried async_callback (which is claimed to be obsoleted way of >> > class SleepHandler(tornado.web.RequestHandler): >> > def callback_sleep(self, sec): You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||