Definition at line 215 of file ControlValue.hpp.
216 {
219 for (
size_t index = 0; index <
k_lanes; ++index) {
220 state.lanes[index] =
m_lane[index].load(std::memory_order_relaxed);
221 }
223 state.set =
m_set.load(std::memory_order_relaxed);
224 return state;
226 }
double value() const noexcept
The value as a double.
std::atomic< uint8_t > m_width
std::array< std::atomic< double >, k_lanes > m_lane
static constexpr size_t k_lanes
std::atomic< bool > m_set
auto seqlock_read(const Seqlock &lock, uint32_t max_attempts, Fn &&fn) -> std::optional< std::invoke_result_t< Fn > >
Invoke a read functor under a Seqlock with a bounded retry count.
References k_lanes, MayaFlux::ControlValue::State::lanes, m_lane, m_lock, m_set, m_width, MayaFlux::Memory::seqlock_read(), MayaFlux::ControlValue::State::set, value(), and MayaFlux::ControlValue::State::width.
Referenced by lanes_for().