Interesting, I've never heard about anybody using this. Maybe a bit unreadable? But yeah, should work :)
I believe ConcurrencyKit's impl does this.
https://github.com/concurrencykit/ck/blob/master/include/ck_...
See https://fgiesen.wordpress.com/2012/07/21/the-magic-ring-buff... which takes it even further :)
Nice one!
I believe ConcurrencyKit's impl does this.
https://github.com/concurrencykit/ck/blob/master/include/ck_...
See https://fgiesen.wordpress.com/2012/07/21/the-magic-ring-buff... which takes it even further :)
Nice one!