>> Note that I have a more efficient implementation of a lock-free FIFO
>> for use where the characteristics of a ringbuffer are not desired
>> (i.e. you really are always just pushing and popping elements from the
>> FIFO). The ringbuffer implementation allows it to be used to store
>> streaming data efficiently, but is not so quick for simple push/pop
>> operations. 
>
>who says that ?  :-)
>
>writing only one element at time in the ringbuffer using:
>ptr=buffer->get_write_ptr();
>*ptr=data;
>buffer->increment_write_ptr(1);

right, this is because you used a template version of the RingBuffer
class. i had such a beast at some point, and then got rid of it. its
clear that this is a win for such situations. without the template
version, the code looks (and probably is) more complex.

--p

Reply via email to