test_message.py 文件源码

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

项目:zanph 作者: zanph 项目源码 文件源码
def await_gc(obj, rc):
    """wait for refcount on an object to drop to an expected value

    Necessary because of the zero-copy gc thread,
    which can take some time to receive its DECREF message.
    """
    for i in range(50):
        # rc + 2 because of the refs in this function
        if grc(obj) <= rc + 2:
            return
        time.sleep(0.05)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号