[core] Introduce SequencedScheduler and ParallelScheduler
This commit refactors `utils::ThreadPool` into a template `ThreadedScheduler` class and provides aux type aliases. So that it is possible to obtain a sequenced schedule,where all the scheduled tasks are guarantied to be executed consequently. The sequenced lightweight scheduler is required by both the orchestration thread and the refactored `FileSource` implementation.
This commit is contained in:
@@ -28,7 +28,7 @@ std::shared_ptr<Scheduler> Scheduler::GetBackground() {
|
||||
std::shared_ptr<Scheduler> scheduler = weak.lock();
|
||||
|
||||
if (!scheduler) {
|
||||
weak = scheduler = std::make_shared<ThreadPool>(4);
|
||||
weak = scheduler = std::make_shared<ThreadPool>();
|
||||
}
|
||||
|
||||
return scheduler;
|
||||
|
||||
Reference in New Issue
Block a user