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

python 的多线程因为 GIL 的限制没有 c++/java 的线程高效, python 的协程没有 golang 的 go xx 来得优雅

  •  
  •   yakczh · Mar 5, 2014 · 6083 views
    This topic created in 4641 days ago, the information mentioned may be changed or developed.
    15 replies  •  1970-01-01 08:00:00 +08:00
    simapple
    simapple
    Mar 5, 2014❤️1
    1
    要表达什么?
    baocaixiong
    baocaixiong
    Mar 5, 2014
    2
    要表达什么?
    yakczh
    yakczh
    OP
    Mar 5, 2014
    3
    表达真相
    2ex
    2ex
    Mar 5, 2014
    4
    这谁不知道啊,以大多数人的水平根本无需担心这种限制、优雅的问题,用什么语言都一样。
    justfly
    justfly
    Mar 5, 2014❤️2
    5
    哦,知道了,退下吧。
    est
    est
    Mar 5, 2014❤️5
    6
    喷GIL的从来没在任何语言写过一行有用的多线程应用。
    ivenvd
    ivenvd
    Mar 5, 2014
    7
    楼主,1+1=2
    wuyadong
    wuyadong
    Mar 5, 2014
    8
    GIL对多线程限制没有想象的那么大。至于协程,python又很多优雅的第三方库,也蛮优雅的。
    ipconfiger
    ipconfiger
    Mar 5, 2014
    9
    如果以IO等待为主的话,GIL并不成其为阻碍。和C++,Java比效率很差那是因为运行时本身速度本来就慢的缘故
    hhkbp2
    hhkbp2
    Mar 5, 2014
    10
    @justfly
    谢主隆恩
    zxc111
    zxc111
    Mar 5, 2014
    11
    对于IO阻塞类的就算有GIL又如何,多线程又不是只能用在运算类型上
    nooper
    nooper
    Mar 5, 2014
    12
    直接上CUDA计算不就完了!
    for4
    for4
    Mar 5, 2014
    13
    go xxx 不错, 但还谈不上优雅。
    yakczh
    yakczh
    OP
    Mar 5, 2014
    14
    @for4 求优雅
    yueyoum
    yueyoum
    Mar 5, 2014
    15
    并行还是看erlang吧, 那才是真正的优雅
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4942 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 02:35 · PVG 10:35 · LAX 18:35 · JFK 21:35
    ♥ Do have faith in what you're doing.