32 using Task = std::function<void()>;
40 explicit TaskSystem(
size_t n_threads = std::thread::hardware_concurrency());
52 void push(Task&& p)
const;
56 std::vector<std::thread> pool_;
57 std::atomic<bool> is_running_;
58 std::unique_ptr<TaskQueue> queue_;
Create a TaskSystem object. The only way to create a TaskSystem is through this factory....
Definition tasks.h:30
void push(Task &&p) const
push tasks the queue for later execution on the thread pool.
Definition tasks.cpp:54
TaskSystem(size_t n_threads=std::thread::hardware_concurrency())
Construct a new Task System object with n threads.
Definition tasks.cpp:22