Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/HAL
Inheritance Hierarchy
- FThreadSafeCounter
- FThreadSafeBool
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/HAL/ThreadSafeCounter.h |
| Include | #include "HAL/ThreadSafeCounter.h" |
Syntax
class FThreadSafeCounter
Remarks
Thread safe counter
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor.Initializes the counter to 0. | |||
FThreadSafeCounter
(
const FThreadSafeCounter& Other |
Copy Constructor. | ||
FThreadSafeCounter
(
int32 Value |
Constructor, initializing counter to passed in value. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | Adds an amount and returns the old value. | ||
| int32 | Decrement () |
Decrement and return new value. | |
| int32 | GetValue () |
Gets the current value. | |
| int32 | Increment () |
Increment and return new value. | |
| int32 | Reset () |
Resets the counter's value to zero. | |
| int32 | Sets the counter to a specific value and returns the old value. | ||
| int32 | Subtracts an amount and returns the old value. |
Typedefs
| Name | Description |
|---|---|
| IntegerType |