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

◆ atomic_set_flag_weak()

void MayaFlux::Nodes::atomic_set_flag_weak ( std::atomic< Utils::NodeState > &  flag,
Utils::NodeState expected,
const Utils::NodeState desired 
)

Atomically sets a node state flag with weak memory ordering.

Parameters
flagThe atomic node state to modify
expectedThe expected current state value
desiredThe desired new state value

A performance-optimized version of state setting that's used in less critical paths of the audio engine. This helps maintain node state consistency while potentially improving performance in high-throughput audio processing scenarios.

Definition at line 118 of file NodeUtils.cpp.

119{
120 flag.compare_exchange_weak(expected, desired);
121};