diff options
author | Nicolas Noble <nnoble@google.com> | 2015-02-23 15:28:04 -0800 |
---|---|---|
committer | Nicolas Noble <nnoble@google.com> | 2015-02-23 15:38:52 -0800 |
commit | 65b0759653bf36e6ed71e61f57796b85ab6f5ac9 (patch) | |
tree | fdf9241644f6686f6836219fa59c731574471b54 /src/cpp/server | |
parent | 74ae8f61d9cbc51d532b6ad98185094c1912a624 (diff) |
Addressing a first batch of feedback.
Diffstat (limited to 'src/cpp/server')
-rw-r--r-- | src/cpp/server/thread_pool.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpp/server/thread_pool.cc b/src/cpp/server/thread_pool.cc index 1ca98129d3..fa11ddd04c 100644 --- a/src/cpp/server/thread_pool.cc +++ b/src/cpp/server/thread_pool.cc @@ -37,11 +37,11 @@ namespace grpc { ThreadPool::ThreadPool(int num_threads) { for (int i = 0; i < num_threads; i++) { - threads_.push_back(std::thread([=]() { + threads_.push_back(std::thread([this]() { for (;;) { - std::unique_lock<std::mutex> lock(mu_); // Wait until work is available or we are shutting down. - auto have_work = [=]() { return shutdown_ || !callbacks_.empty(); }; + auto have_work = [this]() { return shutdown_ || !callbacks_.empty(); }; + std::unique_lock<std::mutex> lock(mu_); if (!have_work()) { cv_.wait(lock, have_work); } |