std::atomic_ref<T>::wait
Min standard notice:
Performs atomic waiting operations. Behaves as if it repeatedly performs the following steps:
# Declarations
void wait( value_type old, std::memory_order order =
std::memory_order_seq_cst ) const noexcept;
(constexpr since C++26)
# Parameters
old: the value to check the atomic_ref’s object no longer containsorder: memory order constraints to enforce
# Notes
This form of change-detection is often more efficient than simple polling or pure spinlocks.
Due to the ABA problem, transient changes from old to another value and back to old might be missed, and not unblock.
The comparison is bitwise (similar to std::memcmp); no comparison operator is used. Padding bits that never participate in an object’s value representation are ignored.
# Example
This section is incompleteReason: no example