class ThreadPoolTaskGroup
Declaration
class ThreadPoolTaskGroup { /* full declaration omitted */ };
Description
A group of tasks to be run on a thread pool. Thread pool tasks in different groups can run on the same threadpool but can be waited for separately. It is even possible for tasks of one group to submit and wait for tasks of another group, as long as this does not form a loop.
Declared at: llvm/include/llvm/Support/ThreadPool.h:224
Member Variables
- private llvm::ThreadPool& Pool
Method Overview
- public ThreadPoolTaskGroup(llvm::ThreadPool & Pool)
- public template <typename Function, typename... Args>inline auto async(Function && F, Args &&... ArgList)
- public void wait()
- public ~ThreadPoolTaskGroup()
Methods
¶ThreadPoolTaskGroup(llvm::ThreadPool& Pool)
ThreadPoolTaskGroup(llvm::ThreadPool& Pool)
Description
The ThreadPool argument is the thread pool to forward calls to.
Declared at: llvm/include/llvm/Support/ThreadPool.h:227
Parameters
- llvm::ThreadPool& Pool
¶template <typename Function, typename... Args>
inline auto async(Function&& F, Args&&... ArgList)
template <typename Function, typename... Args>
inline auto async(Function&& F, Args&&... ArgList)
Description
Calls ThreadPool::async() for this group.
Declared at: llvm/include/llvm/Support/ThreadPool.h:235
Templates
- Function
- Args
Parameters
- Function&& F
- Args&&... ArgList
¶void wait()
void wait()
Description
Calls ThreadPool::wait() for this group.
Declared at: llvm/include/llvm/Support/ThreadPool.h:241
¶~ThreadPoolTaskGroup()
~ThreadPoolTaskGroup()
Description
Blocking destructor: will wait for all the tasks in the group to complete by calling ThreadPool::wait().
Declared at: llvm/include/llvm/Support/ThreadPool.h:231