lambda_state_server.py 文件源码

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

项目:mu 作者: excamera 项目源码 文件源码
def rwsplit(sts, ret, tmbs):
    diffs = {}
    for idx in sts:
        st = sts[idx]
        if st.sock is not None:
            val = select.POLLIN

            if st.ssl_write or st.want_write:
                val = val | select.POLLOUT

            if ret.get(idx) != val:
                ret[idx] = val
                diffs[idx] = True

        else:
            ret[idx] = 0
            diffs[idx] = False

            if st.want_handle:
                plist = tmbs.setdefault(st.partner, [])
                while st.want_handle:
                    tombstone = (st.dequeue(), time.time())
                    plist.append(tombstone)

    return diffs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号