
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
Hi, oh sorry, I overlooked this. Hmm that's pretty high requirements which leave me little choice other than pointers I guess. Yes, static asserts will help (oh and a bigger font for requirements ;-) ). Thanks, Christophe