Lines Matching refs:ThreadPool
1 //==-- llvm/Support/ThreadPool.cpp - A ThreadPool implementation -*- C++ -*-==//
13 #include "llvm/Support/ThreadPool.h"
24 ThreadPool::ThreadPool() : ThreadPool(hardware_concurrency()) {}
26 ThreadPool::ThreadPool(unsigned ThreadCount)
59 // Adjust `ActiveThreads`, in case someone waits on ThreadPool::wait()
64 // Notify task completion, in case someone waits on ThreadPool::wait()
71 void ThreadPool::wait() {
81 std::shared_future<void> ThreadPool::asyncImpl(TaskTy Task) {
90 assert(EnableFlag && "Queuing a thread during ThreadPool destruction");
99 ThreadPool::~ThreadPool() {
111 ThreadPool::ThreadPool() : ThreadPool(0) {}
114 ThreadPool::ThreadPool(unsigned ThreadCount)
117 errs() << "Warning: request a ThreadPool with " << ThreadCount
122 void ThreadPool::wait() {
131 std::shared_future<void> ThreadPool::asyncImpl(TaskTy Task) {
134 // Wrap the future so that both ThreadPool::wait() can operate and the
141 ThreadPool::~ThreadPool() {