
14 Feb
2013
14 Feb
'13
8:21 p.m.
On Thu, Feb 14, 2013 at 10:17 AM, chris
Hello All,
If we can't use shared_ptr in a lockfree queue, how can I share data between different queue ?
I have some data that I have to be put in different queues and I want to avoid that I have to copy this data for each queue.
1) Use raw pointers with boost lockfree queues 2) Use shared pointers with a std::queue and a boost::mutex to ensure thread safety (note that this may not necessarily be slower than using the lockfree queue) 3) Use moveable objects with boost container deque There are more options, if one of these does not suffice. Brian