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
ALLROBOT
V2EX  ›  Python

你愿意用哪个异步库? trio-tractor、aiomultiprocess 或原生库?

  •  
  •   ALLROBOT · 17 天前 · 940 次点击
    基于多进程运行异步任务,大概是每个进程运行一个异步事件循环


    github:
    https://github.com/omnilib/aiomultiprocess
    https://github.com/goodboy/tractor
    等等

    总之免得自己造轮子,网上找的一些轮子库

    用 Python 写多进程异步的,感觉哪个异步库用起来最舒服?
    3 条回复    2024-06-17 15:02:54 +08:00
    baidu2022
        1
    baidu2022  
       16 天前 via iPhone
    python 很多异步是多线程模拟的,



    因此直接换 go 了,异步操作丢给语言本身解决
    ALLROBOT
        2
    ALLROBOT  
    OP
       16 天前
    @baidu2022 #1 如果项目是纯 Python 写的,用别的语言重构太麻烦
    wryyyyyyyyyyyy
        3
    wryyyyyyyyyyyy  
       5 天前
    哦牛的,还有这种东西,前几天看到就好了,公司 wincc 版本升级,导致读不到数据就崩溃,研究 1.5 天把原来单线程跑的改成原生的进程池了,但感觉开销有点大。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2117 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 01:45 · PVG 09:45 · LAX 18:45 · JFK 21:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.