Boost logo

Boost Users :

Subject: Re: [Boost-users] [Review] Lockfree review starts today, July 18th
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2011-07-20 22:11:31

On Mon, Jul 18, 2011 at 7:08 PM, Tim Blechmann <tim_at_[hidden]> wrote:
>> - 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?)


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at