From: Jimmy <li.jiam...@gmail.com>
Date: Tue, 2 Oct 2012 20:57:24 -0700 (PDT)
Local: Tues, Oct 2 2012 11:57 pm
Subject: Re: How to call tornado asynchronous function right?
I don't mean to make it sleep. You can assume the sleep to some heavy load How to use gen.Task to create async behavior? On Wednesday, October 3, 2012 5:51:54 AM UTC+8, 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.
| ||||||||||||||