Thread safe counter
更多...
#include <ThreadSafeCounter.h>
◆ FThreadSafeCounter() [1/3]
| FThreadSafeCounter::FThreadSafeCounter |
( |
| ) |
|
|
inline |
Default constructor.
Initializes the counter to 0.
◆ FThreadSafeCounter() [2/3]
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 |
◆ FThreadSafeCounter() [3/3]
| FThreadSafeCounter::FThreadSafeCounter |
( |
int32 |
Value | ) |
|
|
inline |
Constructor, initializing counter to passed in value.
- 参数
-
| Value | Value to initialize counter to |
◆ Add()
| int32 FThreadSafeCounter::Add |
( |
int32 |
Amount | ) |
|
|
inline |
◆ Decrement()
| int32 FThreadSafeCounter::Decrement |
( |
| ) |
|
|
inline |
◆ GetValue()
| int32 FThreadSafeCounter::GetValue |
( |
| ) |
const |
|
inline |
Gets the current value.
- 返回
- the current value
◆ Increment()
| int32 FThreadSafeCounter::Increment |
( |
| ) |
|
|
inline |
◆ Reset()
| int32 FThreadSafeCounter::Reset |
( |
| ) |
|
|
inline |
◆ Set()
| int32 FThreadSafeCounter::Set |
( |
int32 |
Value | ) |
|
|
inline |
◆ Subtract()
| int32 FThreadSafeCounter::Subtract |
( |
int32 |
Amount | ) |
|
|
inline |
Subtracts an amount and returns the old value.
- 参数
-
| Amount | Amount to decrease the counter by |
- 返回
- the old value
- 参见
- Add, Decrement, Increment, Reset, Set
该类的文档由以下文件生成: