Tervel
1.0.0
A collection of wait-free containers and algorithms.
|
This class is used to safe guard access to values. More...
#include <wf_hash_map.h>
Public Member Functions | |
ValueAccessor () | |
~ValueAccessor () | |
Value * | value () |
bool | valid () |
void | reset () |
Resets this value accessors, decrementing the access_count and clearing the variables. More... | |
Private Member Functions | |
void | init (Value *value, std::atomic< int64_t > *access_count) |
Initializes the value accessor. More... | |
Private Attributes | |
std::atomic< int64_t > * | access_count_ |
Value * | value_ |
Friends | |
class | HashMap |
This class is used to safe guard access to values.
Before it is initialized the referenced data_node's access counter would have been incremented.
|
inline |
|
inline |
|
inlineprivate |
Initializes the value accessor.
value | the address of the value |
access_count | the address of the value's access_count |
|
inline |
Resets this value accessors, decrementing the access_count and clearing the variables.
|
inline |
|
inline |
|
friend |
|
private |
|
private |