171 Config* config, std::string* error);
213 static std::unique_ptr<Client>
Create(
const Config&, std::string* error);
A Jobserver::Client instance models a client of an external GNU jobserver pool, which can be implemen...
virtual Slot TryAcquire()
Try to acquire a slot from the pool.
static std::unique_ptr< Client > Create(const Config &, std::string *error)
Create a new Client instance from a given configuration.
virtual void Release(Slot slot)
Release a slot to the pool.
A Jobserver::Config models how to access or implement a GNU jobserver implementation.
std::string path
For kModeFifo, this is the path to the Unix FIFO to use.
bool HasMode()
Return true if this instance matches an active implementation mode.
Mode
Different implementation modes for the slot pool.
Mode mode
Implementation mode for the pool.
A Jobserver::Slot models a single job slot that can be acquired from.
uint8_t GetExplicitValue() const
Return value of an explicit slot.
bool IsExplicit() const
Return true if this instance represents an explicit job slot.
Slot & operator=(const Slot &)=delete
Slot()=default
Default constructor creates invalid instance.
static Slot CreateImplicit()
Create instance for the implicit value.
static Slot CreateExplicit(uint8_t value)
Create instance for explicit byte value.
Slot(Slot &&o) noexcept
Move operations are allowed.
bool IsImplicit() const
Return true if this instance represents an implicit job slot.
Slot(const Slot &)=delete
Copy operations are disallowed.
Slot & operator=(Slot &&o) noexcept
static constexpr int16_t kImplicitValue
bool IsValid() const
Return true if this instance is valid, i.e.
Jobserver provides types related to managing a pool of "job slots" using the GNU Make jobserver ptoco...
static bool ParseNativeMakeFlagsValue(const char *makeflags_env, Config *config, std::string *error)
A variant of ParseMakeFlagsValue() that will return an error if the parsed result is not compatible w...
static bool ParseMakeFlagsValue(const char *makeflags_env, Config *config, std::string *error)
Parse the value of a MAKEFLAGS environment variable.