CSProducerConsumerData
A thread-safe data structure for producer-consumer scenarios.
It maintains two versions of data: an 'active' one for consumers and a 'prepared' one for the producer. The producer can prepare new data in the background. The swap() method then atomically makes the prepared data active for consumers.
Type Parameters
T
The type of data being managed.