Subject: Re: [boost] boost.lockfree update
From: Tim Blechmann (tim_at_[hidden])
Date: 2010-08-15 08:13:06
>>> All this said, I have to say that the fifo performance in our
>>> environment (64 bit linux with 8 xeon processors, gcc 4.5) was quite
>>> good. Comparable with tbb::concurrent_queue and way better than all
>>> the other options we tried.
>> Did your application use a queue of PODS, structures, or pointers?
>>>From you post, it sounds like the second isn't supported.
> I used a non-pod struct. As I mentioned I had to disable the is_pod
> check to be able to test it. I didn't notice any adverse effects.
> Another nice thing would be to provide move semantics. My struct's are
> moved, not copied, into the queue.
the fifo is an implementation of the michael-scott queue . the dequeue
operation copies the payload (D12), without knowing if the operation can be
completed. if two threads are trying to dequeue at the same time, the
assignment may happen twice. one thread will succeed, the other one will
have to retry. with a trivial assignment, this is safe, with a non-trivial
assignment there are cases (e.g. auto_ptr), you will experience some
-- tim_at_[hidden] http://tim.klingt.org The composer makes plans, music laughs. Morton Feldman