Thread-safe flag with atomic operations.
More...
#include <thread_safe_state.hpp>
|
| | ThreadSafeFlag (bool initial_value=false) |
| |
| bool | get () const noexcept |
| |
| void | set (bool value=true) noexcept |
| |
| void | clear () noexcept |
| |
| bool | test_and_set () noexcept |
| |
| bool | compare_and_set (bool expected, bool desired) noexcept |
| |
| void | wait_for_true (std::chrono::milliseconds timeout=std::chrono::milliseconds(1000)) const |
| |
| void | wait_for_false (std::chrono::milliseconds timeout=std::chrono::milliseconds(1000)) const |
| |
Thread-safe flag with atomic operations.
Definition at line 145 of file thread_safe_state.hpp.
◆ ThreadSafeFlag()
| unilink::concurrency::ThreadSafeFlag::ThreadSafeFlag |
( |
bool |
initial_value = false | ) |
|
|
inlineexplicit |
◆ clear()
| void unilink::concurrency::ThreadSafeFlag::clear |
( |
| ) |
|
|
inlinenoexcept |
◆ compare_and_set()
| bool unilink::concurrency::ThreadSafeFlag::compare_and_set |
( |
bool |
expected, |
|
|
bool |
desired |
|
) |
| |
|
inlinenoexcept |
◆ get()
| bool unilink::concurrency::ThreadSafeFlag::get |
( |
| ) |
const |
|
inlinenoexcept |
◆ set()
| void unilink::concurrency::ThreadSafeFlag::set |
( |
bool |
value = true | ) |
|
|
inlinenoexcept |
◆ test_and_set()
| bool unilink::concurrency::ThreadSafeFlag::test_and_set |
( |
| ) |
|
|
inlinenoexcept |
◆ wait_for_false()
| void unilink::concurrency::ThreadSafeFlag::wait_for_false |
( |
std::chrono::milliseconds |
timeout = std::chrono::milliseconds(1000) | ) |
const |
|
inline |
◆ wait_for_true()
| void unilink::concurrency::ThreadSafeFlag::wait_for_true |
( |
std::chrono::milliseconds |
timeout = std::chrono::milliseconds(1000) | ) |
const |
|
inline |
The documentation for this class was generated from the following file: