
I'd like to use a spsc_queue of unique_ptr's to bigger objects, to
transfer ownership between threads. That way, I can create/allocate an
object in a non-realtime thread, then transfer ownership to a realtime
thread using a lockfree queue, and, using another queue, pass on the
unique_ptr to another thread that takes care of cleanup when the
realtime thread no longer needs the it.
For example:
boost::lockfree::spsc_queue

On 11/09/2014 09:49 PM, Thomas Danckaert wrote:
I'd like to use a spsc_queue of unique_ptr's to bigger objects, to transfer ownership between threads. That way, I can create/allocate an
This limitation inherited from atomic, and I am afraid that it is a bit more complicated than adding a move constructor. Fortunately, there is a C++ proposal to address the problem: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4058.pdf
participants (2)
-
Bjorn Reese
-
Thomas Danckaert