25 struct mitk::Scheduler::Impl
27 std::vector<SchedulableProcess*> processQueue;
28 SchedulingAlgorithmBase* algorithm;
45 assert(
false &&
"Unknown scheduling algorithm!");
57 if (process ==
nullptr)
60 if (std::find(
m_Impl->processQueue.begin(),
m_Impl->processQueue.end(), process) ==
m_Impl->processQueue.end())
61 m_Impl->processQueue.push_back(process);
66 if (process ==
nullptr)
69 auto it = std::find(
m_Impl->processQueue.begin(),
m_Impl->processQueue.end(), process);
71 if (it !=
m_Impl->processQueue.end())
72 m_Impl->processQueue.erase(it);
77 return m_Impl->processQueue.empty();
82 return !
m_Impl->processQueue.empty()
89 return m_Impl->algorithm->GetNextProcess(
m_Impl->processQueue);
SchedulableProcess * GetCurrentProcess()
void AddProcess(SchedulableProcess *process)
void RemoveProcess(SchedulableProcess *process)
SchedulableProcess * GetNextProcess()
Scheduler(SchedulingAlgorithm::Enum algorithm=SchedulingAlgorithm::RoundRobin)