LLVM: llvm::JobserverClientImpl Class Reference (original) (raw)

Public Member Functions
JobserverClientImpl (const JobserverConfig &Config)
~JobserverClientImpl () override
JobSlot tryAcquire () override
Tries to acquire a job slot from the pool.
void release (JobSlot Slot) override
Releases a job slot back to the pool.
unsigned getNumJobs () const override
Returns the number of job slots available, as determined on first use.
bool isValid () const
Public Member Functions inherited from llvm::JobserverClient
virtual ~JobserverClient ()
Additional Inherited Members
Static Public Member Functions inherited from llvm::JobserverClient
static LLVM_ABI_FOR_TEST JobserverClient * getInstance ()
Returns the singleton instance of the JobserverClient.
static LLVM_ABI_FOR_TEST void resetForTesting ()
Resets the singleton instance. For testing purposes only.

Definition at line 147 of file Jobserver.cpp.

llvm::JobserverClientImpl::JobserverClientImpl ( const JobserverConfig & Config )

~JobserverClientImpl()

llvm::JobserverClientImpl::~JobserverClientImpl ( ) override

getNumJobs()

unsigned llvm::JobserverClientImpl::getNumJobs ( ) const inlineoverridevirtual

Returns the number of job slots available, as determined on first use.

This value is cached. Returns 0 if no jobserver is active.

Implements llvm::JobserverClient.

Definition at line 158 of file Jobserver.cpp.

isValid()

bool llvm::JobserverClientImpl::isValid ( ) const inline

release()

void llvm::JobserverClientImpl::release ( JobSlot Slot) overridevirtual

tryAcquire()

JobSlot llvm::JobserverClientImpl::tryAcquire ( ) overridevirtual

Tries to acquire a job slot from the pool.

On failure (e.g., if the pool is empty), this returns an invalid JobSlot instance. The first successful call will always return the implicit slot.

Implements llvm::JobserverClient.


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