25 #include <olp/core/thread/TaskScheduler.h>
82 uint32_t priority)
override;
88 std::vector<std::thread> thread_pool_;
90 std::unique_ptr<QueueImpl> queue_;
An abstract interface that is used as a base for the custom thread scheduling strategy.
Definition: TaskScheduler.h:45
std::function< void()> CallFuncType
An alias for the abstract interface input.
Definition: TaskScheduler.h:48
An implementation of the TaskScheduler instance that uses a thread pool.
Definition: ThreadPoolTaskScheduler.h:35
ThreadPoolTaskScheduler(size_t thread_count=1u)
Creates the ThreadPoolTaskScheduler object with one thread.
void EnqueueTask(TaskScheduler::CallFuncType &&func, uint32_t priority) override
Overrides the base class method to enqueue tasks and execute them on the next free thread from the th...
void EnqueueTask(TaskScheduler::CallFuncType &&func) override
Overrides the base class method to enqueue tasks and execute them on the next free thread from the th...
ThreadPoolTaskScheduler(ThreadPoolTaskScheduler &&)=delete
Non-copyable, non-movable.
~ThreadPoolTaskScheduler() override
Closes the SyncQueue instance and joins threads.
ThreadPoolTaskScheduler & operator=(ThreadPoolTaskScheduler &&)=delete
Non-copyable, non-movable.
ThreadPoolTaskScheduler(const ThreadPoolTaskScheduler &)=delete
Non-copyable, non-movable.
ThreadPoolTaskScheduler & operator=(const ThreadPoolTaskScheduler &)=delete
Non-copyable, non-movable.
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24