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

◆ pump_conditional()

void MayaFlux::Vruta::TaskScheduler::pump_conditional ( )
private

Pump the conditional task list in a separate thread.

This method runs in a dedicated thread and continuously checks for conditional tasks that are ready to execute. It processes these tasks based on their conditions and ensures they are executed as soon as their conditions are met.

Definition at line 677 of file Scheduler.cpp.

678{
680
681 if (m_conditional_tasks.empty()) {
682 std::this_thread::yield();
683 return;
684 }
685
686 std::erase_if(m_conditional_tasks, [](const TaskEntry& e) {
687 return !e.routine || !e.routine->is_active();
688 });
689
690 for (auto& entry : m_conditional_tasks) {
691 if (entry.routine && entry.routine->is_active())
692 entry.routine->try_resume(0);
693 }
694}
std::vector< TaskEntry > m_conditional_tasks
void drain_conditional_pending()
Drain pending conditional task operations before processing.

References drain_conditional_pending(), m_conditional_tasks, and MayaFlux::Vruta::TaskEntry::routine.

Referenced by start_conditional_thread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: