ringbuffer.py 文件源码

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

项目:ringbuffer 作者: bslatkin 项目源码 文件源码
def __init__(self, *, slot_bytes, slot_count):
        """Initializer.

        Args:
            slot_bytes: How big each buffer in the array should be.
            slot_count: How many buffers should be in the array.
        """
        self.slot_bytes = slot_bytes
        self.slot_count = slot_count
        self.length_bytes = 4
        slot_type = ctypes.c_byte * (slot_bytes + self.length_bytes)
        self.array = multiprocessing.RawArray(slot_type, slot_count)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号