LLVM: llvm::SingleThreadExecutor Class Reference (original) (raw)
A non-threaded implementation. More...
#include "[llvm/Support/ThreadPool.h](ThreadPool%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| SingleThreadExecutor (ThreadPoolStrategy ignored={}) | |
| Construct a non-threaded pool, ignoring using the hardware strategy. | |
| ~SingleThreadExecutor () override | |
| Blocking destructor: the pool will first execute the pending tasks. | |
| SingleThreadExecutor (const SingleThreadExecutor &)=delete | |
| SingleThreadExecutor & | operator= (const SingleThreadExecutor &)=delete |
| void | wait () override |
| Blocking wait for all the tasks to execute first. | |
| void | wait (ThreadPoolTaskGroup &Group) override |
| Blocking wait for only all the tasks in the given group to complete. | |
| unsigned | getMaxConcurrency () const override |
| Returns always 1: there is no concurrency. | |
| bool | isWorkerThread () const |
| Returns true if the current thread is a worker thread of this thread pool. | |
| Public Member Functions inherited from llvm::ThreadPoolInterface | |
| virtual | ~ThreadPoolInterface () |
| Destroying the pool will drain the pending tasks and wait. | |
| template<typename Function, typename... Args> | |
| auto | async (Function &&F, Args &&...ArgList) |
| Asynchronous submission of a task to the pool. | |
| template<typename Function, typename... Args> | |
| auto | async (ThreadPoolTaskGroup &Group, Function &&F, Args &&...ArgList) |
| Overload, task will be in the given task group. | |
| template | |
| auto | async (Func &&F) -> std::shared_future< decltype(F())> |
| Asynchronous submission of a task to the pool. | |
| template | |
| auto | async (ThreadPoolTaskGroup &Group, Func &&F) -> std::shared_future< decltype(F())> |
A non-threaded implementation.
Definition at line 220 of file ThreadPool.h.
◆ ~SingleThreadExecutor()
| SingleThreadExecutor::~SingleThreadExecutor ( ) | override |
|---|
Blocking destructor: the pool will first execute the pending tasks.
Definition at line 328 of file ThreadPool.cpp.
References wait().
◆ SingleThreadExecutor() [2/2]
◆ getMaxConcurrency()
| unsigned llvm::SingleThreadExecutor::getMaxConcurrency ( ) const | inlineoverridevirtual |
|---|
◆ isWorkerThread()
| bool SingleThreadExecutor::isWorkerThread | ( | ) | const |
|---|
◆ operator=()
◆ wait() [1/2]
| void SingleThreadExecutor::wait ( ) | overridevirtual |
|---|
◆ wait() [2/2]
The documentation for this class was generated from the following files:
- include/llvm/Support/ThreadPool.h
- lib/Support/ThreadPool.cpp