katgpucbf.ringbuffer module

Wraps spead2.recv.ChunkRingbuffer with monitoring capabilities.

class katgpucbf.ringbuffer.ChunkRingbuffer(maxsize: int, *, name: str, task_name: str, monitor: Monitor)[source]

Bases: ChunkRingbuffer

Wraps spead2.recv.ChunkRingbuffer with monitoring capabilities.

When waiting for the next heap, it uses Monitor.with_state() to indicate that heaps are being waited for. Whenever a heap is retrieved, it updates the size of the queue.

async get() Chunk[source]

Override base class method to use the monitor.