Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ringbuffer more robust or improve usage comments #20

Open
axel-h opened this issue Oct 26, 2022 · 1 comment
Open

Make ringbuffer more robust or improve usage comments #20

axel-h opened this issue Oct 26, 2022 · 1 comment

Comments

@axel-h
Copy link
Member

axel-h commented Oct 26, 2022

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.

@kent-mcleod
Copy link
Member

Maybe we consider just removing the library before merging the libsharedringbuffer implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants