9#ifndef SKYWAY_GLOBAL_WORKER_HPP_
10#define SKYWAY_GLOBAL_WORKER_HPP_
15#include <condition_variable>
17#include "skyway/global/interface/worker.hpp"
23class Worker :
public interface::Worker {
25 using Task = std::function<void()>;
34 void AddTask(Task& task)
override;
35 void AddTask(
const Task&& task)
override;
40 std::deque<Task> tasks_;
42 std::condition_variable cv_;
43 bool is_termination_requested_ =
false;