r/cpp • u/david-alvarez-rosa • Mar 24 '26
Optimizing a Lock-Free Ring Buffer
https://david.alvarezrosa.com/posts/optimizing-a-lock-free-ring-buffer/
106
Upvotes
r/cpp • u/david-alvarez-rosa • Mar 24 '26
View all comments
Show parent comment
3
u/SkoomaDentist Antimodern C++, Embedded, Audio Mar 25 '26
Hell, writing locking code that does that is already tricky enough as soon as you move to fine grained locking. I wish there were tried and tested standalone lock free implementation of the most common structures that were actually lock free instead of the usual "let's fall back to locking because obviously lock free is always purely a throughput optimization" (spoiler: It is very much not).