Tornado Asynchronous Handler

前端 未结 3 889
半阙折子戏
半阙折子戏 2020-12-09 21:10

I am attempting to implement get_current_user in the RequestHandler for Tornado, but I need the call to block while waiting on the asynchronous call to my database. Decorat

3条回答
  •  旧时难觅i
    2020-12-09 22:02

    I thought Tornado allowed you to make either blocking or non-blocking requests.

    Here is Tornado being used for both: https://bitbucket.org/nephics/tornado-couchdb/src/147579581b47/couch.py

    Disclaimer: I know very little of Python and Tornado.

提交回复
热议问题