Atomic event counter.
More...
#include <cds/algo/atomic.h>
Atomic event counter.
This class is based on std::atomic_size_t
. It uses relaxed memory ordering memory_order_relaxed
and may be used as a statistic counter.
◆ operator+=()
size_t cds::atomicity::event_counter::operator+= |
( |
size_t |
n | ) |
|
|
inlinenoexcept |
Addition.
Returns new value of the atomic counter.
- Parameters
-
◆ operator-=()
size_t cds::atomicity::event_counter::operator-= |
( |
size_t |
n | ) |
|
|
inlinenoexcept |
Substraction.
Returns new value of the atomic counter.
- Parameters
-
◆ operator=()
Assign operator.
Returns n
.
- Parameters
-
n | new value of the counter |
The documentation for this class was generated from the following file: