Format some more files in user/
PiperOrigin-RevId: 958383817 Change-Id: I17fcdbf32967ec5a5c4d2552823ef5100faaea3b
This commit is contained in:
committed by
Copybara-Service
parent
7927e908a3
commit
8a643f4e2b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user