- Why does ringbuffer have range enqueue functionality, but not the other two classes?
the ringbuffer will be able to enqueue the range in one step, stack and fifo cannot do this. but maybe it would make sense to add a range interface, but document the behavior.
For a node-based stack, can't you build the linked list of nodes "on the side" with the last node pointing to head, then CAS the head to point the first node in your on-the-side list, to enqueue the whole range atomically? And then also have the strong exception guarantee?
Or am I missing something (about the allocation scheme maybe?)
hm, i was actually thinking about both enqueuing and dequeuing of multiple objects. but if it is just about enqueuing it, it might be reasonable ... will check ... tim