MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ pending()

template<typename T>
std::shared_ptr< const T > MayaFlux::ControlSnapshot< T >::pending ( )
inlinenodiscardnoexcept

The value to apply now, or null when nothing is due.

A value is returned once per change.

Definition at line 69 of file ControlSnapshot.hpp.

70 {
71 if (!has_value() || !m_dirty.exchange(false, std::memory_order_acq_rel)) {
72 return nullptr;
73 }
74 return value();
75 }
std::atomic< bool > m_dirty
std::shared_ptr< const T > value() const noexcept
The current value, or null when none was given.
bool has_value() const noexcept
True once a value was given.
One pending value of any copyable type, such as a string or a list, set from any thread.

References has_value(), m_dirty, and value().

Here is the call graph for this function: