V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Jan 19, 2022 · 3168 views
    This topic created in 1560 days ago, the information mentioned may be changed or developed.

    另外: 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 replies    2022-01-29 14:56:24 +08:00
    tisswb
        1
    tisswb  
       Jan 25, 2022
    aio 的话 已经是协程了 还要啥多进程?
    lambdaT
        2
    lambdaT  
    OP
       Jan 28, 2022
    @tisswb aio 还不能利用多核哈.
    tisswb
        3
    tisswb  
       Jan 29, 2022
    @lambdaT 那就别用 aiohttp 管理进程了,用别的工具 比如 supervisor
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5666 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 08:32 · PVG 16:32 · LAX 01:32 · JFK 04:32
    ♥ Do have faith in what you're doing.