推荐学习书目
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
simplesslife
V2EX  ›  Python

python 多进程中的 Queue 和 多线程的 Queue 的底层实现是怎样的?

  •  
  •   simplesslife · Aug 15, 2016 · 3646 views
    This topic created in 3583 days ago, the information mentioned may be changed or developed.

    多进程的 Queue 使用的共享内存吗?多线程的 Queue 用的堆? 还有 Pipe

    求解!

    1 replies    2016-08-15 20:44:28 +08:00
    SErHo
        1
    SErHo  
       Aug 15, 2016   ❤️ 1
    多进程用的是 Pipe ,多线程就是堆内存了,有没有其他实现不太清楚:

    [1]: https://hg.python.org/cpython/file/2.7/Lib/multiprocessing/queues.py#l62
    [2]: https://hg.python.org/cpython/file/2.7/Lib/Queue.py#l198
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   856 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 19:55 · PVG 03:55 · LAX 12:55 · JFK 15:55
    ♥ Do have faith in what you're doing.