THazardPointer

[THazardPointer](API\Runtime\Core\Experimental\Containers\THazardPointer) is used to keep an allocation alive until all threads that referenced it finished their access

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

THazardPointer

DequeueHazard

EnqueueHazard

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Experimental/Containers/HazardPointer.h

Include

#include "Experimental/Containers/HazardPointer.h"

Syntax

template<typename H, bool Cached>
class THazardPointer

Remarks

THazardPointer is used to keep an allocation alive until all threads that referenced it finished their access

Constructors

Name Description

Public function

THazardPointer()

Public function

THazardPointer

(
    THazardPointer&& Other
)

Public function

THazardPointer

(
    std::atomic< H* >& InHazard,
    FHazardPointerCollection& Collecti...
)

Destructors

Name Description

Public function

~THazardPointer()

Functions

Name Description

Public function

void

 

Destroy()

Use with care, because the Hazardpointer will not protect anymore and needs to be recreated

Public function Const

H *

 

Get()

Public function

bool

 

IsValid()

Public function

void

 

Retire()

Retireing can be used to release the hazardpointer without reaquiring a new Hazardslot in the Collection

Operators

Name Description

Public function

THazardPoint...

 

operator=

(
    THazardPointer&& Other
)