Home | History | Annotate | Download | only in Support

Lines Matching defs:ThreadPool

1 //==-- llvm/Support/ThreadPool.cpp - A ThreadPool implementation -*- C++ -*-==//
14 #include "llvm/Support/ThreadPool.h"
24 ThreadPool::ThreadPool() : ThreadPool(std::thread::hardware_concurrency()) {}
26 ThreadPool::ThreadPool(unsigned ThreadCount)
63 // Adjust `ActiveThreads`, in case someone waits on ThreadPool::wait()
68 // Notify task completion, in case someone waits on ThreadPool::wait()
75 void ThreadPool::wait() {
85 std::shared_future<ThreadPool::VoidTy> ThreadPool::asyncImpl(TaskTy Task) {
94 assert(EnableFlag && "Queuing a thread during ThreadPool destruction");
103 ThreadPool::~ThreadPool() {
115 ThreadPool::ThreadPool() : ThreadPool(0) {}
118 ThreadPool::ThreadPool(unsigned ThreadCount)
121 errs() << "Warning: request a ThreadPool with " << ThreadCount
126 void ThreadPool::wait() {
139 std::shared_future<ThreadPool::VoidTy> ThreadPool::asyncImpl(TaskTy Task) {
143 // Wrap the future so that both ThreadPool::wait() can operate and the
154 ThreadPool::~ThreadPool() {