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

python GIL 如果可以调整颗粒度会怎么样

  •  
  •   SlipStupig · 2016-03-05 05:48:35 +08:00 · 2240 次点击
    这是一个创建于 2986 天前的主题,其中的信息可能已经有所发展或是发生改变。
    python 的解释器用的事情全局锁,假设能让开发人员自定义锁的颗粒度会怎么样呢?
    shyling
        1
    shyling  
       2016-03-05 08:17:30 +08:00 via iPad
    什么叫锁的颗粒度?或许你需要 https://wiki.python.org/moin/GlobalInterpreterLock
    sujin190
        2
    sujin190  
       2016-03-05 10:37:50 +08:00
    想太多,细粒度的锁早就有人做过了,然而并不好用,还想自定义锁粒度。。
    neoblackcap
        3
    neoblackcap  
       2016-03-05 20:41:55 +08:00
    这个问题好,若是想不用 GIL ,那么已经有一个很好的例子了,那就是 Java 的实现。那可是伤筋动骨的大改造。
    VYSE
        4
    VYSE  
       2016-03-05 22:34:04 +08:00
    Jython 或 IronPython
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1025 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 21:04 · PVG 05:04 · LAX 14:04 · JFK 17:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.