V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
lambdaT
V2EX  ›  Python

aiohttp 咋么起多进程,复用端口呢?

  •  
  •   lambdaT · 2022-01-19 12:49:21 +08:00 · 2334 次点击
    这是一个创建于 800 天前的主题,其中的信息可能已经有所发展或是发生改变。

    另外: https://docs.aiohttp.org/en/stable/web_advanced.html#application-runners

    Application runners run_app() provides a simple blocking API for running an Application.

    For starting the application asynchronously or serving on multiple HOST/PORT AppRunner exists.

    是说 run_app 暴露出去的服务是阻塞的么?

    3 条回复    2022-01-29 14:56:24 +08:00
    tisswb
        1
    tisswb  
       2022-01-25 17:37:42 +08:00
    aio 的话 已经是协程了 还要啥多进程?
    lambdaT
        2
    lambdaT  
    OP
       2022-01-28 11:25:22 +08:00
    @tisswb aio 还不能利用多核哈.
    tisswb
        3
    tisswb  
       2022-01-29 14:56:24 +08:00
    @lambdaT 那就别用 aiohttp 管理进程了,用别的工具 比如 supervisor
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5335 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 08:05 · PVG 16:05 · LAX 01:05 · JFK 04:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.