Re:Yes, You Have Been Writing SPSC Queues Wrong
by loeg on Thursday December 15, 2016 @02:32PM
(#13187444)
If you're overwriting old data you still need to check for overlap and advance the read index if you're overrunning old data.
[ Parent
| on HN ]
Re:Yes, You Have Been Writing SPSC Queues Wrong
by jessaustin on Thursday December 15, 2016 @03:01PM
(#13187750)
Thanks, this is what I was missing, and seems right in general. I think the old ring buffers I'm remembering just decided that reading out-of-order was a fitting punishment for not reading often enough. After all there is a bit of a race for the read index here...