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

◆ set_state()

template<typename T >
void MayaFlux::Vruta::Routine::set_state ( const std::string &  key,
value 
)
inline

Sets a named state value in the coroutine.

Parameters
keyName of the state value
valueValue to store

Stores a value in the coroutine's state dictionary under the given key. This allows the coroutine to maintain state between suspensions and enables external code to influence the coroutine's behavior.

Definition at line 207 of file Routine.hpp.

208 {
209 set_state_impl(key, std::move(value));
210 }
virtual void set_state_impl(const std::string &key, std::any value)=0