I would like to know if a spsc_queue
from Boost.LockFree
can be used with user-defined types. From the examples I am not sure, I just see atomic
s and more atomic
s.
Example:
boost::lockfree::spsc_queue<int, boost::lockfree::capacity<1024> > spsc_queue;
So, can I do this?
boost::lockfree::spsc_queue<ServerReply, boost::lockfree::capacity<1024> > spsc_queue;
I am wondering if only basic types and pointers can be stored, since popping things, etc must be done atomically, but ServerReply is a compound type.