Giter Club home page Giter Club logo

Comments (4)

fzlee avatar fzlee commented on August 19, 2024

我对tornado不太熟悉, 可以详细描述一下你的需求吗?

from alipay.

2811299 avatar 2811299 commented on August 19, 2024

你在做http请求时候是 同步的, 这样在tornado框架下 使用的话 所有的请求都会被卡住
好像是这样,所以不能直接用request或者urllib请求, 只能用tornado的asynchttprequest方法
所以我没直接用你这个, 而是参考着你的代码写的,改起来的话 其实应该只需要增加对 http请求 另一个种封装就可以了, 如果这样的话tornado也可以用了, 好像是这样我也不太懂。

from alipay.

fzlee avatar fzlee commented on August 19, 2024

可以用tornado的run_in_executor封装这些请求吗

from alipay.

2811299 avatar 2811299 commented on August 19, 2024

我用的是tornado的低版本 http请求是由 AsyncHTTPClient 完成的
外面用装饰器@tornado.gen.engine
调用的时候是 yield tornado.gen.Task
我对tornado也不熟, 所以只是单纯的问一下。

from alipay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.