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

关于 Python 的 import lock

  •  
  •   acmerfight · 2014-05-25 23:26:59 +08:00 · 2911 次点击
    这是一个创建于 3627 天前的主题,其中的信息可能已经有所发展或是发生改变。
    遇到一个奇怪的 import lock 问题。写了篇文章分析一下,抛砖引玉。


    https://github.com/acmerfight/insight_python/blob/master/import_bug.md
    http://jianshu.io/p/fc5e4d4c3ef4
    3 条回复    2014-05-26 11:34:23 +08:00
    dbow
        1
    dbow  
       2014-05-25 23:47:56 +08:00
    用多线程活该。
    mengzhuo
        2
    mengzhuo  
       2014-05-26 10:05:23 +08:00
    @dbow 这还真不是锁的原因……
    dbow
        3
    dbow  
       2014-05-26 11:34:23 +08:00
    @mengzhuo _PyImport_AcquireLock()是个线程锁,另外你觉得是什么原因讲一下,谢谢.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3931 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 05:26 · PVG 13:26 · LAX 22:26 · JFK 01:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.