
On Thu, Jan 24, 2013 at 6:24 PM, Tim Blechmann <tim@klingt.org> wrote:
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
Can these requirements be enforced with static_asserts or concept checks?