Subject: [boost] [lockfree] crash in queue
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2013-01-24 09:07:46
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?
boost::lockfree::queue<boost::function<void()> > lfqueue(10000);
boost::atomic<bool> done (false);
for (int i = 0; i != 10000000; ++i)
boost::function<void()> task = empty_task();
boost::thread_group producer_threads, consumer_threads;
for (int i = 0; i != 1; ++i)
for (int i = 0; i != 12; ++i)
done = true;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk