FRWAccessDetector

Read write multithread access detector, will check on concurrent write/write and read/write access, but will not on concurrent read access.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/MTAccessDetector.h

Include

#include "Misc/MTAccessDetector.h"

Syntax

struct FRWAccessDetector

Remarks

Read write multithread access detector, will check on concurrent write/write and read/write access, but will not on concurrent read access.

this detector is not re-entrant, see FRWRecursiveAccessDetector and FRWFullyRecursiveAccessDetector. But FRWAccessDetector should be the default one to start with.

Variables

Name Description

Protected variable

std::atomic< ui...

 

AtomicValue

Constructors

Name Description

Public function

FRWAccessDetector()

Destructors

Name Description

Public function

~FRWAccessDetector()

Functions

Name Description

Public function Const

bool

 

AcquireReadAccess()

Acquires read access, will check if there are any writers

Public function Const

bool

 

AcquireWriteAccess()

Acquires write access, will check if there are readers or other writers

Public function Const

bool

 

ReleaseReadAccess()

Releases read access, will check if there are any writers

Public function Const

bool

 

ReleaseWriteAccess()

Releases write access, will check if there are readers or other writers

Constants

Name

Description

WriterBits

We need to do an atomic operation to know there are multiple writers, this is why we reserve more than one bit for them.

WriterIncrementValue