SkyWay for Linux
読み取り中…
検索中…
一致する文字列を見つけられません
worker.hpp
1//
2// worker.hpp
3// skyway
4//
5// Created by Naoto Takahashi on 2024/03/05.
6// Copyright © 2024 NTT Communications. All rights reserved.
7//
8
9#ifndef SKYWAY_GLOBAL_INTERFACE_WORKER_HPP_
10#define SKYWAY_GLOBAL_INTERFACE_WORKER_HPP_
11
12#include <functional>
13
14namespace skyway {
15namespace global {
16namespace interface {
17
23class Worker {
24public:
25 using Task = std::function<void()>;
26 virtual ~Worker() = default;
34 virtual void AddTask(Task& task) = 0;
35
43 virtual void AddTask(const Task&& task) = 0;
44
49 virtual void Join() = 0;
50};
52
53} // namespace interface
54} // namespace global
55} // namespace skyway
56
57#endif /* SKYWAY_GLOBAL_INTERFACE_WORKER_HPP_ */