28 void Abort()
override;
33 jobserver_->Release(std::move(edge->job_slot_));
45 std::vector<Edge*> edges;
46 for (std::map<const Subprocess*, Edge*>::iterator e =
49 edges.push_back(e->second);
59 size_t subproc_number =
71 if (
config_.max_load_average > 0.0f) {
73 if (load_capacity < capacity)
74 capacity = load_capacity;
80 if (capacity == 0 &&
subprocs_.running_.empty())
99 while ((subproc =
subprocs_.NextFinished()) == NULL) {
108 std::map<const Subprocess*, Edge*>::iterator e =
110 result->
edge = e->second;
A Jobserver::Client instance models a client of an external GNU jobserver pool, which can be implemen...
Options (e.g. verbosity, parallelism) passed to a build.
The result of waiting for a command.
CommandRunner is an interface that wraps running the build subcommands.
static CommandRunner * factory(const BuildConfig &config, Jobserver::Client *jobserver)
Creates the RealCommandRunner.
An edge in the dependency graph; links between Nodes using Rules.
std::string EvaluateCommand(bool incl_rsp_file=false) const
Expand all variables in a command and return it as a string.
std::vector< Edge * > GetActiveEdges() override
Jobserver::Client * jobserver_
bool WaitForCommand(Result *result) override
Wait for a command to complete, or return false if interrupted.
bool StartCommand(Edge *edge) override
RealCommandRunner(const BuildConfig &config, Jobserver::Client *jobserver)
size_t CanRunMore() const override
const BuildConfig & config_
std::map< const Subprocess *, Edge * > subproc_to_edge_
SubprocessSet runs a ppoll/pselect() loop around a set of Subprocesses.
Subprocess wraps a single async subprocess.
ExitStatus Finish()
Returns ExitSuccess on successful process exit, ExitInterrupted if the process was interrupted,...
const std::string & GetOutput() const
signed long long int64_t
A 64-bit integer type.