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

Python 里除了 multiprocessing,还有什么比较好用的多线程库吗?

  •  
  •   Livid · 2018-12-24 22:36:27 +08:00 · 1907 次点击
    这是一个创建于 1921 天前的主题,其中的信息可能已经有所发展或是发生改变。
    7 条回复    2018-12-27 09:09:53 +08:00
    Phant0m
        1
    Phant0m  
       2018-12-24 22:39:35 +08:00 via iPhone
    mulitprocessing 不是多进程吗
    leavic
        2
    leavic  
       2018-12-24 22:39:41 +08:00
    threading?
    lance6716
        3
    lance6716  
       2018-12-24 23:32:17 +08:00
    同求
    Seahurt
        4
    Seahurt  
       2018-12-25 07:15:43 +08:00 via iPhone   ❤️ 2
    multiprocessing.dummy 提供了跟调用进程类似的调用线程的接口,底层还是基于 threading。py3.6 提供给了 concurrent 包,提供了更易于使用的多进程和多线程的功能,具体看官方文档
    fankcoder
        5
    fankcoder  
       2018-12-25 14:38:06 +08:00
    from concurrent.futures import ThreadPoolExecutor
    from concurrent.futures import ProcessPoolExecutor
    zhucegeqiu
        6
    zhucegeqiu  
       2018-12-25 17:33:57 +08:00
    多线程 or 进程?多进程运算我一般用 dask
    yzc27
        7
    yzc27  
       2018-12-27 09:09:53 +08:00
    concurrent.futures
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5417 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:48 · PVG 14:48 · LAX 23:48 · JFK 02:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.