MCPcopy Create free account
hub / github.com/aui-framework/aui / ~AThreadPool

Method ~AThreadPool

aui.core/src/AUI/Thread/AThreadPool.cpp:146–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 .valueOr(glm::max(std::thread::hardware_concurrency() - 1, 2u))) {}
145
146AThreadPool::~AThreadPool() {
147 std::unique_lock lck(mQueueLock);
148 auto workers = std::move(mWorkers);
149 for (auto& f : workers) {
150 f->aboutToDelete();
151 }
152
153 mCV.notify_all();
154 lck.unlock();
155
156 for (auto& f : workers) {
157 f->join();
158 }
159}
160
161void AThreadPool::setWorkersCount(std::size_t workersCount) {
162 AUI_ASSERTX(workersCount >= 2 && workersCount <= 1000, "invalid worker count");

Callers

nothing calls this directly

Calls 4

aboutToDeleteMethod · 0.80
notify_allMethod · 0.80
unlockMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected