Thread safe counter for 64bit ints 更多...
#include <ThreadSafeCounter64.h>
Public 成员函数 | |
| int64 | Add (int64 Amount) |
| Adds an amount and returns the old value. 更多... | |
| int64 | Decrement () |
| Decrement and return new value. 更多... | |
| FThreadSafeCounter64 () | |
| Default constructor. 更多... | |
| FThreadSafeCounter64 (const FThreadSafeCounter &Other) | |
| Copy Constructor. 更多... | |
| FThreadSafeCounter64 (int64 Value) | |
| Constructor, initializing counter to passed in value. 更多... | |
| int64 | GetValue () const |
| Gets the current value. 更多... | |
| int64 | Increment () |
| Increment and return new value. 更多... | |
| FThreadSafeCounter64 & | operator= (const FThreadSafeCounter64 &Other) |
| Assignment has the same caveats as the copy ctor. | |
| int64 | Reset () |
| Resets the counter's value to zero. 更多... | |
| int64 | Set (int64 Value) |
| Sets the counter to a specific value and returns the old value. 更多... | |
| int64 | Subtract (int64 Amount) |
| Subtracts an amount and returns the old value. 更多... | |
Thread safe counter for 64bit ints
|
inline |
Default constructor.
Initializes the counter to 0.
|
inline |
Copy Constructor.
If the counter in the Other parameter is changing from other threads, there are no guarantees as to which values you will get up to the caller to not care, synchronize or other way to make those guarantees.
| Other | The other thread safe counter to copy |
|
inline |
Constructor, initializing counter to passed in value.
| Value | Value to initialize counter to |
|
inline |
|
inline |
|
inline |
Gets the current value.
|
inline |
|
inline |
|
inline |
|
inline |