21 Jul
2011
21 Jul
'11
2:11 a.m.
On Mon, Jul 18, 2011 at 7:08 PM, Tim Blechmann
- 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?) Tony