FThreadSafeCounter64

Thread safe counter for 64bit ints

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/HAL/ThreadSafeCounter64.h

Include

#include "HAL/ThreadSafeCounter64.h"

Syntax

class FThreadSafeCounter64

Remarks

Thread safe counter for 64bit ints

Constructors

Name Description

Public function

FThreadSafeCounter64()

Default constructor.

Initializes the counter to 0.

Public function

FThreadSafeCounter64

(
    const FThreadSafeCounter& Other
)

Copy Constructor.

Public function

FThreadSafeCounter64

(
    int64 Value
)

Constructor, initializing counter to passed in value.

Functions

Name Description

Public function

int64

 

Add

(
    int64 Amount
)

Adds an amount and returns the old value.

Public function

int64

 

Decrement()

Decrement and return new value.

Public function Const

int64

 

GetValue()

Gets the current value.

Public function

int64

 

Increment()

Increment and return new value.

Public function

int64

 

Reset()

Resets the counter's value to zero.

Public function

int64

 

Set

(
    int64 Value
)

Sets the counter to a specific value and returns the old value.

Public function

int64

 

Subtract

(
    int64 Amount
)

Subtracts an amount and returns the old value.

Operators

Name Description

Public function

FThreadSafeC...

 

operator=

(
    const FThreadSafeCounter64& Other
)

Assignment has the same caveats as the copy ctor.

Typedefs

Name

Description

IntegerType

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss