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

◆ snapshot()

HookList::Snapshot MayaFlux::Nodes::HookList::snapshot ( ) const

The current entries, held stable for the lifetime of the returned object.

Definition at line 43 of file NodeUtils.cpp.

44{
45 if (m_head.load(std::memory_order_relaxed) == nullptr) {
46 return {};
47 }
48
49 m_readers.fetch_add(1);
50 const auto* entries = m_head.load();
51 if (!entries) {
52 m_readers.fetch_sub(1);
53 return {};
54 }
55 return { this, entries };
56}
std::atomic< const std::vector< HookEntry > * > m_head
std::atomic< uint32_t > m_readers

References m_head, and m_readers.

Referenced by fire(), MayaFlux::Nodes::Generator::Counter::notify_tick(), MayaFlux::Nodes::Generator::Logic::notify_tick(), MayaFlux::Nodes::Generator::Phasor::notify_tick(), MayaFlux::Nodes::Input::InputNode::notify_tick(), and size().

+ Here is the caller graph for this function: