NCBI C++ ToolKit
|
Search Toolkit Book for CAtomicCounter_WithAutoInit
CAtomicCounter_WithAutoInit –. More...
#include <corelib/ncbicntr.hpp>
Public Member Functions | |
CAtomicCounter_WithAutoInit (TValue initial_value=0) | |
Public Member Functions inherited from CAtomicCounter | |
TValue | Get (void) const THROWS_NONE |
Get atomic counter value. More... | |
void | Set (TValue new_value) THROWS_NONE |
Set atomic counter value. More... | |
TValue | Add (int delta) THROWS_NONE |
Atomically add value (=delta), and return new counter value. More... | |
Additional Inherited Members | |
Public Types inherited from CAtomicCounter | |
typedef TNCBIAtomicValue | TValue |
Alias TValue for TNCBIAtomicValue. More... | |
CAtomicCounter_WithAutoInit –.
Define an atomic counter with guaranteed initialization.
CAtomicCounter does not initialize its value if it's not a static object. CAtomicCounter_WithAutoInit automatically calls Set() in its constructor to set the initial value.
Definition at line 119 of file ncbicntr.hpp.