From: Lorenzo Bolla <lbo...@gmail.com>
Date: Wed, 3 Oct 2012 12:36:00 +0100
Subject: Re: [tornado] Re: How to call tornado asynchronous function right?
I figured that it might be useful to collect answers to all these
Here it is:
If you have comments or you want me to add/correct something, just let me
L.
On Wed, Oct 3, 2012 at 7:04 AM, Ben Darnell <b...@bendarnell.com> wrote:
> Your async_callback version doesn't actually work - it never calls > callback_sleep. async_callback is meant to be used as a wrapper to > deal with exception handling - it was necessary in early versions of > Tornado, but not any more. You probably meant io_loop.add_callback > instead of async_callback, but if you make that change you'll see that > time.sleep blocks in that version as well. > @asynchronous is a declaration, not a directive: it describes the
> -Ben
> On Tue, Oct 2, 2012 at 8:57 PM, Jimmy <li.jiam...@gmail.com> wrote:
> > 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.
| ||||||||||||||