mirror of
https://github.com/ProgramSnail/build_system_2022.git
synced 2025-12-06 00:48:42 +00:00
20 lines
344 B
C++
20 lines
344 B
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <cstddef>
|
||
|
|
|
||
|
|
#include "build_graph.hpp"
|
||
|
|
#include "thread_pool.hpp"
|
||
|
|
|
||
|
|
namespace build_system {
|
||
|
|
|
||
|
|
class Builder {
|
||
|
|
public:
|
||
|
|
explicit Builder(size_t num_threads) : thread_pool_(num_threads) {}
|
||
|
|
|
||
|
|
void execute(const BuildGraph& build_graph, size_t target_id);
|
||
|
|
|
||
|
|
private:
|
||
|
|
ThreadPool thread_pool_;
|
||
|
|
};
|
||
|
|
|
||
|
|
}; // namespace build_system
|