So, suppose I have a struct A { int val1; int val2};
And a std::queue<A> fifo
Two threads, Reader thread: reads all contents from A, and clears it. Writer thread: writes one A at a time to queue.
Is std::queue enough for maintaining a lockless thread safe fifo container with one reader and one writer? If not, can any other stl container work? dequeue is the default underlying in std::queue.