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

◆ cancel()

void MayaFlux::Kriya::EventChain::cancel ( )

Cancels the event chain if it's currently executing.

Terminates the underlying coroutine, preventing any remaining events from executing. Safe to call even if chain has completed.

Definition at line 121 of file Chain.cpp.

122{
123 if (is_active()) {
125 m_routine = nullptr;
126
128 }
129}
Vruta::TaskScheduler & m_Scheduler
Reference to the scheduler that manages timing.
Definition Chain.hpp:185
void fire_on_complete()
Internal method to safely fire the on_complete callback.
Definition Chain.cpp:142
std::shared_ptr< Vruta::SoundRoutine > m_routine
The underlying computational routine that implements the chain.
Definition Chain.hpp:193
bool is_active() const
Checks if the event chain is currently active.
Definition Chain.cpp:131
bool cancel_task(const std::shared_ptr< Routine > &routine)
Cancels and removes a task from the scheduler.
Definition Scheduler.cpp:62

References MayaFlux::Vruta::TaskScheduler::cancel_task(), fire_on_complete(), is_active(), m_routine, and m_Scheduler.

+ Here is the call graph for this function: