aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpp/server/fixed_size_thread_pool.cc3
-rw-r--r--src/cpp/server/server.cc2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/cpp/server/fixed_size_thread_pool.cc b/src/cpp/server/fixed_size_thread_pool.cc
index 710bcbb573..bafbc5802a 100644
--- a/src/cpp/server/fixed_size_thread_pool.cc
+++ b/src/cpp/server/fixed_size_thread_pool.cc
@@ -76,8 +76,7 @@ FixedSizeThreadPool::~FixedSizeThreadPool() {
}
}
-void FixedSizeThreadPool::ScheduleCallback(
- const std::function<void()>& callback) {
+void FixedSizeThreadPool::Add(const std::function<void()>& callback) {
grpc::lock_guard<grpc::mutex> lock(mu_);
callbacks_.push(callback);
cv_.notify_one();
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc
index e6761d6244..ab87b22f5f 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server.cc
@@ -383,7 +383,7 @@ void Server::ScheduleCallback() {
grpc::unique_lock<grpc::mutex> lock(mu_);
num_running_cb_++;
}
- thread_pool_->ScheduleCallback(std::bind(&Server::RunRpc, this));
+ thread_pool_->Add(std::bind(&Server::RunRpc, this));
}
void Server::RunRpc() {