Navigation
API > API/Runtime > API/Runtime/Core
Thread safe counter for 64bit ints
| Name | FThreadSafeCounter64 |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/HAL/ThreadSafeCounter64.h |
| Include Path | #include "HAL/ThreadSafeCounter64.h" |
Syntax
class FThreadSafeCounter64
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Default constructor.Initializes the counter to 0. | HAL/ThreadSafeCounter64.h | ||
FThreadSafeCounter64
(
const FThreadSafeCounter64& Other |
Copy Constructor. | HAL/ThreadSafeCounter64.h | |
FThreadSafeCounter64
(
int64 Value |
Constructor, initializing counter to passed in value. | HAL/ThreadSafeCounter64.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| IntegerType | int64 | HAL/ThreadSafeCounter64.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Counter | volatile int64 | Thread-safe counter | HAL/ThreadSafeCounter64.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int64 Add
(
int64 Amount |
Adds an amount and returns the old value. | HAL/ThreadSafeCounter64.h | |
int64 Decrement () |
Decrement and return new value. | HAL/ThreadSafeCounter64.h | |
int64 GetValue() |
Gets the current value. | HAL/ThreadSafeCounter64.h | |
int64 Increment () |
Increment and return new value. | HAL/ThreadSafeCounter64.h | |
int64 Reset () |
Resets the counter's value to zero. | HAL/ThreadSafeCounter64.h | |
int64 Set
(
int64 Value |
Sets the counter to a specific value and returns the old value. | HAL/ThreadSafeCounter64.h | |
int64 Subtract
(
int64 Amount |
Subtracts an amount and returns the old value. | HAL/ThreadSafeCounter64.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FThreadSafeCounter64 & operator=
(
const FThreadSafeCounter64& Other |
Assignment has the same caveats as the copy ctor. | HAL/ThreadSafeCounter64.h |