![]() |
MySQL
8.0.23
Source Code Documentation
|
Utility class implementing an atomic boolean on top of an int32. More...
Public Member Functions | |
atomic_boolean (bool value=false) | |
Constructs a new atomic_boolean. More... | |
bool | is_set (bool value=true) |
Checks if the atomic boolean has a certain value. More... | |
void | set (bool new_value) |
Sets a new value for the atomic boolean. More... | |
Private Attributes | |
std::atomic< int32 > | m_value |
storage for the boolean's current value More... | |
Static Private Attributes | |
static const int | m_true = 0 |
constants for true and false More... | |
static const int | m_false = 1 |
Utility class implementing an atomic boolean on top of an int32.
The mysys lib does not support atomic booleans.
Constructs a new atomic_boolean.
value | The value to initialize the boolean with. |
Checks if the atomic boolean has a certain value.
if used without an argument checks if the atomic boolean is on.
value | the value to check for |
true | the atomic boolean value matches the argument value |
false | the atomic boolean value is different from the argument value |
|
inline |
Sets a new value for the atomic boolean.
new_value | value to set |
|
staticprivate |
|
staticprivate |
constants for true and false
|
private |
storage for the boolean's current value