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;}}};