MayaFlux 0.4.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 685 of file Scheduler.cpp.

686{
688
689 if (m_conditional_tasks.empty()) {
690 std::this_thread::yield();
691 return;
692 }
693
694 std::erase_if(m_conditional_tasks, [](const TaskEntry& e) {
695 return !e.routine || !e.routine->is_active();
696 });
697
698 for (auto& entry : m_conditional_tasks) {
699 if (entry.routine && entry.routine->is_active())
700 entry.routine->try_resume(0);
701 }
702}
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: