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

为啥 Python 里面这么多 green 库, 比如 greenlet、green unicorn……有啥讲究么 习惯、文化上?

  •  
  •   ebingtel · Oct 26, 2020 · 3155 views
    This topic created in 2206 days ago, the information mentioned may be changed or developed.
    6 replies  •  2020-10-27 12:32:44 +08:00
    misaka19000
    misaka19000
    Oct 26, 2020
    1
    估计和协程相关
    secondwtq
    secondwtq
    Oct 26, 2020 via iPhone
    2
    全是头上带点绿的……
    matrix67
    matrix67
    Oct 26, 2020
    3
    你这么说还真是。。。
    westoy
    westoy
    Oct 26, 2020
    4
    就是无污染的意思

    一方面,stackless -> greenlet,stackless 的用法是 cPython 打 stackless 的 patch 后重新编译, 也就是说需要动到 Python 本身, 而 port 到 py.greenlet 后就是作为一个跑在 cPython 下面的单独的包

    另一方面,green thread 对应的是原生 Pthread

    greenlet 火了后基于这一脉的都习惯性的叫 green xxx 了
    ebingtel
    ebingtel
    OP
    Oct 27, 2020
    5
    @westoy 搜了一下 搜出来的是 green thread……似乎是从 java 借鉴来的
    julyclyde
    julyclyde
    Oct 27, 2020
    6
    其实就两种吧
    gevent 和 greenlet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   947 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 19:47 · PVG 03:47 · LAX 11:47 · JFK 14:47
    ♥ Do have faith in what you're doing.