summaryrefslogtreecommitdiff
path: root/absl/synchronization/internal/thread_pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/synchronization/internal/thread_pool.h')
-rw-r--r--absl/synchronization/internal/thread_pool.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/synchronization/internal/thread_pool.h b/absl/synchronization/internal/thread_pool.h
index 84640427..c753a68d 100644
--- a/absl/synchronization/internal/thread_pool.h
+++ b/absl/synchronization/internal/thread_pool.h
@@ -16,6 +16,7 @@
#define ABSL_SYNCHRONIZATION_INTERNAL_THREAD_POOL_H_
#include <cassert>
+#include <cstddef>
#include <functional>
#include <queue>
#include <thread> // NOLINT(build/c++11)
@@ -42,7 +43,7 @@ class ThreadPool {
~ThreadPool() {
{
absl::MutexLock l(&mu_);
- for (int i = 0; i < threads_.size(); ++i) {
+ for (size_t i = 0; i < threads_.size(); i++) {
queue_.push(nullptr); // Shutdown signal.
}
}