Skip to content

Make ringbuffer more robust or improve usage comments #20

@axel-h

Description

@axel-h

Follow-up from #18 (comment)

The ring buffer does not support 0 as data value, but expects this as an end marker. Thus I wonder if rb_new()should do a r->base[0] = 0 to ensure it starts with an empty buffer. Or do a check that the buffer contains at least one NULL value of pre-filled buffers are also supported. Otherwise rb_poll_byte() would loop forever in the worst case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions