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

写了一个 Python 下的并发库叫 aiochan,请大家多提意见

  •  
  •   amadeoh · 2018-09-12 11:57:54 +08:00 · 2080 次点击
    这是一个创建于 2025 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 条回复    2018-09-12 13:21:59 +08:00
    jason0916
        1
    jason0916  
       2018-09-12 13:13:06 +08:00
    python 的 csp 是不是没法像 go 那样 M:N 地利用多核?我还没有仔细阅读大佬你的代码,看了一眼 import 似乎是 线程池+async 的组合
    amadeoh
        2
    amadeoh  
    OP
       2018-09-12 13:21:59 +08:00
    @jason0916 确实没法像 go 那样自由地使用多核,但是 parallel_pipe 和 parallel_pipe_unordered 两个方法是可以用 process pool 的,一般的问题把所有核跑满也没问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2855 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:45 · PVG 21:45 · LAX 06:45 · JFK 09:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.