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

Single-producer/multiple consumer ring buffer #11

Open
yangsuli-netapp opened this issue Aug 1, 2022 · 2 comments
Open

Single-producer/multiple consumer ring buffer #11

yangsuli-netapp opened this issue Aug 1, 2022 · 2 comments

Comments

@yangsuli-netapp
Copy link

yangsuli-netapp commented Aug 1, 2022

Hi,

Thank you for providing this library; we found it highly performant and quite useful.

However, we need to use it in a different scenario, with only a single producer and multiple consumers. Upon reading the code, I think a very similar implementation would work, where instead of maintaining per-producer seen/ready-offset, we maintain a separate offset per consumer. During acquiring, the (single) producer checks the offset of each producer, and use the lowest one as the available acquirable range.

Is my understanding correct? If so, do you have plans on implementing such a SPMC ring buffer?

Thanks!

Suli

@rmind
Copy link
Owner

rmind commented Aug 1, 2022

Hi @yangsuli-netapp,

What's your budget? :) I can write one taylored for your requirements. I do wonder, though, what problem are you solving with the SPMC ring buffer.

-- Mindaugas

@yangsuli-netapp
Copy link
Author

yangsuli-netapp commented Aug 1, 2022 via email

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