diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-02-24 08:12:05 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-02-24 08:12:05 -0800 |
commit | 25f6cd7a97dc669ea71b9556392772c3473efc89 (patch) | |
tree | f66dd0aefb0836d2fa412731ad63c29442b5ab2c /src/cpp/server | |
parent | e8eb8a4fd46b56dfbfdc8666fa498186b824bed0 (diff) | |
parent | f7c87c2741e18e9fb481252151f14fff8ed026d3 (diff) |
Merge github.com:grpc/grpc into credit
Conflicts:
examples/pubsub/publisher_test.cc
examples/pubsub/subscriber_test.cc
include/grpc++/create_channel.h
src/cpp/client/create_channel.cc
test/cpp/end2end/async_end2end_test.cc
test/cpp/end2end/end2end_test.cc
test/cpp/util/create_test_channel.cc
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); } |