FGuardedTripleBuffer

Triple buffer based on a single atomic variable, that guards against the consumer thread using old values.

Windows
MacOS
Linux

Inheritance Hierarchy

IBufferResource

FGuardedTripleBuffer

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/MultiBufferResource.h

Include

#include "Chaos/Framework/MultiBufferResource.h"

Syntax

template<typename ResourceType>
class FGuardedTripleBuffer : public Chaos::IBufferResource< ResourceType >

Remarks

Triple buffer based on a single atomic variable, that guards against the consumer thread using old values.

Not thread-safe, requires external locks.

Constructors

Name Description

Public function

FGuardedTripleBuffer()

This class implements a circular buffer access pattern, such that during normal serial operation each buffer will be used.

Functions

Name Description

Public function Const

const Resour...

 

PeekConsumerBuffer()

Get access to the currently held consumer buffer, ignoring whether it's already been consumed.

Overridden from IBufferResource

Name Description

Public function Virtual

ResourceType...

 

AccessProducerBuffer()

Get the current producer buffer for writing.

Public function Virtual

void

 

FlipProducer()

Make the current producer buffer available to the consumer thread.

Public function Virtual

EMultiBuffer...

 

GetBufferMode()

Public function Virtual Const

const Resour...

 

GetConsumerBuffer()

Get an updated buffer for the consuming thread to read from.

Public function Virtual

ResourceType...

 

GetConsumerBufferMutable()

Public function Virtual Const

const Resour...

 

GetProducerBuffer()

Get the current producer buffer.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss