llvm::StdThreadPool

A ThreadPool implementation using std::threads.

Synopsis

Declared in <llvm/Support/ThreadPool.h>

class StdThreadPool
    : public ThreadPoolInterface

Description

The pool keeps a vector of threads alive, waiting on a condition variable for some work to become available.

Base Classes

NameDescription
ThreadPoolInterfaceThis defines the abstract base interface for a ThreadPool allowing asynchronous parallel execution on a defined number of threads.

Member Functions

NameDescription
StdThreadPool [constructor]Construct a pool using hardware strategy S.
~StdThreadPool [destructor] [virtual]Blocking destructor: the pool will wait for all the threads to complete.
async async overloads
getMaxConcurrency [virtual]Returns the maximum number of worker threads in the pool, not the current number of threads!
isWorkerThread Returns true if the current thread is a worker thread of this thread pool.
wait wait overloads