diff options
Diffstat (limited to 'absl/synchronization/internal/thread_pool.h')
-rw-r--r-- | absl/synchronization/internal/thread_pool.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/absl/synchronization/internal/thread_pool.h b/absl/synchronization/internal/thread_pool.h index 66c7546b..8941be68 100644 --- a/absl/synchronization/internal/thread_pool.h +++ b/absl/synchronization/internal/thread_pool.h @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -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) @@ -25,7 +26,7 @@ #include "absl/synchronization/mutex.h" namespace absl { -inline namespace lts_2018_12_18 { +inline namespace lts_2019_08_08 { namespace synchronization_internal { // A simple ThreadPool implementation for tests. @@ -43,7 +44,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. } } @@ -86,7 +87,7 @@ class ThreadPool { }; } // namespace synchronization_internal -} // inline namespace lts_2018_12_18 +} // inline namespace lts_2019_08_08 } // namespace absl #endif // ABSL_SYNCHRONIZATION_INTERNAL_THREAD_POOL_H_ |