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

◆ atomic_set_flag_weak()

void MayaFlux::Nodes::atomic_set_flag_weak ( std::atomic< NodeState > &  flag,
NodeState expected,
const 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 116 of file NodeUtils.cpp.

117{
118 flag.compare_exchange_weak(expected, desired);
119};