builtins.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:RealtimePythonChat 作者: quangtqag 项目源码 文件源码
def _unlock_imports():
    """
    Internal function, called when gevent needs to perform imports
    lazily, but does not know the state of the system. It may be impossible
    to take the import lock because there are no other running greenlets, for
    example. This causes a monkey-patched __import__ to avoid taking any locks.
    until the corresponding call to lock_imports. This should only be done for limited
    amounts of time and when the set of imports is statically known to be "safe".
    """
    global __lock_imports
    # This could easily become a list that we push/pop from or an integer
    # we increment if we need to do this recursively, but we shouldn't get
    # that complex.
    __lock_imports = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号