Format some more files in user/

PiperOrigin-RevId: 958383817
Change-Id: I17fcdbf32967ec5a5c4d2552823ef5100faaea3b
This commit is contained in:
Yuval Tassa
2026-08-03 08:16:21 -07:00
committed by Copybara-Service
parent 7927e908a3
commit 8a643f4e2b
9 changed files with 961 additions and 1202 deletions
+2 -6
View File
@@ -35,14 +35,10 @@ ThreadPool::ThreadPool(int num_threads) : ctr_(0) {
ThreadPool::~ThreadPool() {
{
std::unique_lock<std::mutex> lock(m_);
for (int i = 0; i < threads_.size(); i++) {
queue_.push(nullptr);
}
for (int i = 0; i < threads_.size(); i++) { queue_.push(nullptr); }
cv_in_.notify_all();
}
for (auto& thread : threads_) {
thread.join();
}
for (auto& thread : threads_) { thread.join(); }
}
// ThreadPool scheduler