graph-prototype
graph-prototype copied to clipboard
Races in multi-producer circular buffer
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.