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

Races in multi-producer circular buffer #275

Open
frankosterfeld opened this issue Feb 15, 2024 · 0 comments
Open

Races in multi-producer circular buffer #275

frankosterfeld opened this issue Feb 15, 2024 · 0 comments

Comments

@frankosterfeld
Copy link
Contributor

When used with ProducerType::Multi, gr::CircularBuffer has some threading bugs that causes data to be read that has not been published yet by its writer.
That's because in the current implementation, a single cursor is used, and that's already increased by the writer at reservation time. Readers rely on being available to read up to the cursor, and get wrong data if the data wasn't published yet by the writer.

frank/fix-race-circular-multi has two tests demonstrating the issue.

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

1 participant