Hacker News
new
past
comments
ask
show
jobs
points
by
JonChesterfield
7 hours ago
|
comments
by
loeg
7 hours ago
|
next
[-]
You ultimately need a mask to access the correct slot in the ring. But it's true that you can leave unmasked values in your reader/writer indices.
reply
by
dalvrosa
7 hours ago
|
prev
|
[-]
Interesting, I've never heard about anybody using this. Maybe a bit unreadable? But yeah, should work :)
reply
by
loeg
10 minutes ago
|
parent
|
next
[-]
I believe ConcurrencyKit's impl does this.
https://github.com/concurrencykit/ck/blob/master/include/ck_...
reply
by
mandarax8
5 hours ago
|
parent
|
prev
|
[-]
See
https://fgiesen.wordpress.com/2012/07/21/the-magic-ring-buff...
which takes it even further :)
reply
by
dalvrosa
4 hours ago
|
parent
|
[-]
Nice one!
reply