Subject: Re: [boost] [lockfree::fifo] Review
From: Tim Blechmann (tim_at_[hidden])
Date: 2009-12-21 09:23:19


>> yes, i would guess, the performance characteristics differ depending on
>> the number of elements in the buffer. also, the current implementation
>> can easily be adapted to enqueue/dequeue multiple objects efficiently ...
>
> For the single-producer/consumer queue you can treat the access like a
> transaction. For instance, the producer can read/write to the buffer up to
> the tail and commit the update just by incrementing the head. A consumer can
> read/write to the produced portion of the buffer and commit by bumping the
> tail. This is can good because you can avoid copying is come cases and allow
> the thread to use the data in the buffer directly. Here is an example of
> such an algorithm:

i just had a brief look at the algorithm, but it doesn't look too
different from the kfifo ringbuffer from the linux kernel, does it?

thanks, tim

-- 
tim_at_[hidden]
http://tim.klingt.org
The aim of education is the knowledge, not of facts, but of values
  William S. Burroughs