points
if (next_head == buffer.size()) next_head = 0;
https://github.com/concurrencykit/ck/blob/master/include/ck_...
It's mentioned in the post, but worth reiterating!