Ninja
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
RealCommandRunner Struct Reference
Inheritance diagram for RealCommandRunner:
Inheritance graph
[legend]

Public Member Functions

void Abort () override
 
size_t CanRunMore () const override
 
void ClearJobTokens ()
 
std::vector< Edge * > GetActiveEdges () override
 
 RealCommandRunner (const BuildConfig &config, Jobserver::Client *jobserver)
 
bool StartCommand (Edge *edge) override
 
bool WaitForCommand (Result *result) override
 Wait for a command to complete, or return false if interrupted. More...
 

Static Public Member Functions

static CommandRunnerfactory (const BuildConfig &config, Jobserver::Client *jobserver)
 Creates the RealCommandRunner. More...
 

Public Attributes

const BuildConfigconfig_
 
Jobserver::Clientjobserver_ = nullptr
 
std::map< const Subprocess *, Edge * > subproc_to_edge_
 
SubprocessSet subprocs_
 

Detailed Description

Definition at line 20 of file real_command_runner.cc.

Constructor & Destructor Documentation

◆ RealCommandRunner()

RealCommandRunner::RealCommandRunner ( const BuildConfig config,
Jobserver::Client jobserver 
)
inlineexplicit

Definition at line 21 of file real_command_runner.cc.

Member Function Documentation

◆ Abort()

void RealCommandRunner::Abort ( )
overridevirtual

Reimplemented from CommandRunner.

Definition at line 53 of file real_command_runner.cc.

References SubprocessSet::Clear(), ClearJobTokens(), and subprocs_.

◆ CanRunMore()

size_t RealCommandRunner::CanRunMore ( ) const
overridevirtual

◆ ClearJobTokens()

void RealCommandRunner::ClearJobTokens ( )
inline

Definition at line 30 of file real_command_runner.cc.

References GetActiveEdges(), jobserver_, and Jobserver::Client::Release().

Referenced by Abort().

◆ factory()

CommandRunner * CommandRunner::factory ( const BuildConfig config,
Jobserver::Client jobserver 
)
staticinherited

Creates the RealCommandRunner.

  • jobserver can be nullptr if there is no jobserver pool to use.

Definition at line 117 of file real_command_runner.cc.

Referenced by Builder::Build().

◆ GetActiveEdges()

std::vector< Edge * > RealCommandRunner::GetActiveEdges ( )
overridevirtual

Reimplemented from CommandRunner.

Definition at line 44 of file real_command_runner.cc.

References subproc_to_edge_.

Referenced by ClearJobTokens().

◆ StartCommand()

bool RealCommandRunner::StartCommand ( Edge edge)
overridevirtual

◆ WaitForCommand()

bool RealCommandRunner::WaitForCommand ( Result result)
overridevirtual

Member Data Documentation

◆ config_

const BuildConfig& RealCommandRunner::config_

Definition at line 38 of file real_command_runner.cc.

Referenced by CanRunMore().

◆ jobserver_

Jobserver::Client* RealCommandRunner::jobserver_ = nullptr

Definition at line 40 of file real_command_runner.cc.

Referenced by CanRunMore(), and ClearJobTokens().

◆ subproc_to_edge_

std::map<const Subprocess*, Edge*> RealCommandRunner::subproc_to_edge_

Definition at line 41 of file real_command_runner.cc.

Referenced by GetActiveEdges(), StartCommand(), and WaitForCommand().

◆ subprocs_

SubprocessSet RealCommandRunner::subprocs_

Definition at line 39 of file real_command_runner.cc.

Referenced by Abort(), CanRunMore(), StartCommand(), and WaitForCommand().


The documentation for this struct was generated from the following file: