I'd agree with Tim that the spsc_queue is too similar to the proposed ringbuffer to make much sense. Any additions need to be more significantly different like say the ringbuffer log mentioned.
Somehow I failed to sell correctly my idea, but unless I missed something,
it's not possible to store buffers of different sizes inside a spsc_queue.
(of course it is possible if you can afford using some external storage,
like the heap)
The proposed ringbuffer is quite different in that is only stores raw
buffers,
and allow one to do that without any extra copy.
For example, one could read from a socket in one thread, while handling
them in another:
if (auto buf = rb.start_write(1500)) {
ssize_t read_size = ::read(fd, &buf.data[0], 1500);
if (read_size > 0)
rb.commit_write(read_size);
}
Of course, one could use a `spsc_queue