On Mon, Feb 17, 2025 at 6:55 PM Kirill Reshke <reshkekirill@gmail.com> wrote:
> Just out of curiosity, should we `Assert(*index + n <
> stream->queue_size);` in `read_stream_index_advance_n`?
No: it is allowed to be >= queue_size temporarily, but if so we
subtract queue_size. The result should be equal to (index + n) %
queue_size, assuming small values of n, except we don't want to use %
in hot code. Perhaps we should assert that though!