cmake-template
Loading...
Searching...
No Matches
scheduler.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4
5class IScheduler {
6public:
7 virtual ~IScheduler() = default;
8
19 virtual void schedule(std::function<void()> task) = 0;
20
29 virtual void wait() = 0;
30
40 virtual void shutdown() = 0;
41};
Definition: scheduler.hpp:5
virtual void wait()=0
Waits for all scheduled tasks to complete.
virtual ~IScheduler()=default
virtual void schedule(std::function< void()> task)=0
Schedules a task to be executed by the scheduler.
virtual void shutdown()=0
Shuts down the scheduler and stops all scheduled tasks.