|
unilink
0.4.3
A simple C++ library for unified async communication
|
Thread-safe atomic state wrapper. More...
#include <thread_safe_state.hpp>
Public Types | |
| using | State = StateType |
Public Member Functions | |
| AtomicState (const State &initial_state=State{}) | |
| State | get () const noexcept |
| void | set (const State &new_state) noexcept |
| void | set (State &&new_state) noexcept |
| bool | compare_and_set (const State &expected, const State &desired) noexcept |
| State | exchange (const State &new_state) noexcept |
| bool | is_state (const State &expected_state) const noexcept |
Thread-safe atomic state wrapper.
Lightweight wrapper for atomic state management when full thread-safe state management is not needed.
Definition at line 101 of file thread_safe_state.hpp.
| using unilink::concurrency::AtomicState< StateType >::State = StateType |
Definition at line 103 of file thread_safe_state.hpp.
|
explicit |
Definition at line 290 of file thread_safe_state.hpp.
|
noexcept |
Definition at line 308 of file thread_safe_state.hpp.
|
noexcept |
Definition at line 314 of file thread_safe_state.hpp.
|
noexcept |
Definition at line 293 of file thread_safe_state.hpp.
|
noexcept |
Definition at line 319 of file thread_safe_state.hpp.
|
noexcept |
Definition at line 298 of file thread_safe_state.hpp.
|
noexcept |
Definition at line 303 of file thread_safe_state.hpp.