libqi-api
2.8.7.4
|
#include <atomic.hpp>
Public Member Functions | |
Atomic () | |
Atomic (T value) | |
Atomic (const Atomic &other) | |
T | operator++ () |
Atomic pre-increment of the value. More... | |
T | operator-- () |
Atomic pre-decrement of the value. More... | |
T | operator++ (int) |
Atomic post-increment of the value. More... | |
T | operator-- (int) |
Atomic post-decrement of the value. More... | |
Atomic< T > & | operator= (T value) |
Atomic< T > & | operator= (const Atomic< T > &value) |
bool | setIfEquals (T testValue, T setValue) |
T | swap (T value) |
T | operator* () const |
T | load () const |
Public Attributes | |
std::atomic< T > | _value |
Atomic operations on integrals.
This class allows to do operations on an integral value from multiple threads, with the guarantee that each operation will not lead to a data race.
Definition at line 156 of file atomic.hpp.
|
inline |
Definition at line 162 of file atomic.hpp.
|
inline |
Atomic constructor setting value to its parameter.
value | The default value of the atomic. |
Definition at line 168 of file atomic.hpp.
|
inline |
Definition at line 174 of file atomic.hpp.
|
inline |
Definition at line 221 of file atomic.hpp.
|
inline |
Return the contained valu Deprecated since 2.5.0
Definition at line 218 of file atomic.hpp.
|
inline |
Atomic pre-increment of the value.
Definition at line 179 of file atomic.hpp.
|
inline |
Atomic post-increment of the value.
Definition at line 186 of file atomic.hpp.
|
inline |
Atomic pre-decrement of the value.
Definition at line 182 of file atomic.hpp.
|
inline |
Atomic post-decrement of the value.
Definition at line 191 of file atomic.hpp.
|
inline |
Definition at line 196 of file atomic.hpp.
|
inline |
Definition at line 198 of file atomic.hpp.
|
inline |
If value is testValue, replace it with setValue.
Definition at line 204 of file atomic.hpp.
|
inline |
Swap the atomic value with value.
Definition at line 210 of file atomic.hpp.
std::atomic<T> qi::Atomic< T >::_value |
Definition at line 158 of file atomic.hpp.