MayaFlux 0.4.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 179 of file Chain.cpp.

180{
181 if (is_active()) {
183 m_routine = nullptr;
184
186 }
187}
Vruta::TaskScheduler & m_Scheduler
Reference to the scheduler that manages timing.
Definition Chain.hpp:188
void fire_on_complete()
Internal method to safely fire the on_complete callback.
Definition Chain.cpp:200
std::shared_ptr< Vruta::Routine > m_routine
The underlying computational routine that implements the chain.
Definition Chain.hpp:205
bool is_active() const
Checks if the event chain is currently active.
Definition Chain.cpp:189
bool cancel_task(const std::shared_ptr< Routine > &routine)
Cancels and removes a task from the scheduler.

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

+ Here is the call graph for this function: