Subject: Re: [boost] [lockfree] crash in queue
From: Tim Blechmann (tim_at_[hidden])
Date: 2013-01-25 04:27:50
>> > 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
> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk