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

◆ end()

void MayaFlux::Kriya::BufferPipeline::end ( )

End a running pipeline now.

Cancels the pipeline's routine, releases the reference it holds to itself and fires the on_complete callback once. Nothing runs after the cycle in progress. Does nothing if the pipeline is not running.

Definition at line 210 of file BufferPipeline.cpp.

211{
213
214 const auto routine = std::move(m_routine);
215 const auto self = std::move(m_active_self);
216
217 if (!routine) {
218 return;
219 }
220
221 const bool running = routine->is_active();
222
223 if (m_scheduler) {
224 m_scheduler->cancel_task(routine);
225 }
226
227 if (running && m_on_complete) {
229 }
230}
std::shared_ptr< BufferPipeline > m_active_self
std::shared_ptr< Vruta::Routine > m_routine
std::function< void()> m_on_complete
Vruta::TaskScheduler * m_scheduler
bool cancel_task(const std::shared_ptr< Routine > &routine)
Cancels and removes a task from the scheduler.

References MayaFlux::Vruta::TaskScheduler::cancel_task(), m_active_self, m_continuous_execution, m_on_complete, m_routine, and m_scheduler.

+ Here is the call graph for this function: