Boost logo

Boost :

Subject: Re: [boost] [lockfree] crash in queue
From: Tim Blechmann (tim_at_[hidden])
Date: 2013-01-24 09:24:44

> I tried using lockfree::queue but I keep getting a crash. My configuration:
> boost 1.53 beta1, g++ 4.5 / clang (from trunk, a few weeks old), both
> in c+11, i7 6 cores / 12 threads.
> My test program is pretty much your example, except that my data is
> not an int but a boost::function.
> As a note, the crash seems to happen only when I have many consumers.
> Many producers and one consumer seem to be ok.
> Am I doing something wrong?

didn't test your code, but i'm pretty sure that boost::function is
violating the requirements of the lockfree queue:
* trivial copy constructor
* trivial assignment
* trivial destructor

cheers, tim

Boost list run by bdawes at, gregod at, cpdaniel at, john at