Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Experimental > API/Runtime/Core/Experimental/Containers
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
| Type | Name | Description | |
|---|---|---|---|
THazardPointer
(
THazardPointer&& Other |
|||
THazardPointer
(
std::atomic< H* >& InHazard, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Destroy () |
Use with care, because the Hazardpointer will not protect anymore and needs to be recreated | |
| H * | Get () |
||
| bool | IsValid () |
||
| void | Retire () |
Retireing can be used to release the hazardpointer without reaquiring a new Hazardslot in the Collection |
Operators
| Type | Name | Description | |
|---|---|---|---|
| THazardPointer & | operator=
(
THazardPointer&& Other |