
25 Jan
2013
25 Jan
'13
9:27 a.m.
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.
there are several reasons for this, e.g. the algorithm copies the payload before knowing if it is valid ... heap-allocating objects inside the data structure and using pointers internally would relax the requirements, but violate the lock-free property ... tim