graph-prototype icon indicating copy to clipboard operation
graph-prototype copied to clipboard

Races in multi-producer circular buffer

Open frankosterfeld opened this issue 4 months ago • 0 comments

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.

frankosterfeld avatar Feb 15 '24 11:02 frankosterfeld