/Engine/Source/Runtime/Experimental/Chaos/Public/Framework/TripleBufferedData.h
Consumer thread: structMyConsumer{//Inthisexampletheconsumerownsthetriplebuffer,butthat's//notarequirement.TTripleBufferedDataAnimXfTripleBuffer;AnimXf*Buffer=nullptr;//Thisfunctioniscalledrepeatedlyatsomeintervalbytheconsumingthread.voidConsume(){//Getanewviewofthedata,whichcanbenullorold.Buffer=AnimXfTripleBuffer.ExchangeAnimXfConsumerBuffer();//ThisclassnowhasexclusiveownershipofthememorypointedtobyBuffer.if(Buffer){...=Buffer->Xf;...=Buffer->Velocity;}}};
template<class DataType> class TTripleBufferedData