std::max is not available on some windows platforms

pull/16081/head
Sree Kuchibhotla 6 years ago
parent ece265778b
commit 6eac5e41b1
  1. 5
      src/cpp/thread_manager/thread_manager.cc

@ -170,8 +170,9 @@ void ThreadManager::MainWorkLoop() {
grpc_resource_user_allocate_threads(resource_user_, 1)) {
num_pollers_++;
num_threads_++;
max_active_threads_sofar_ =
std::max(max_active_threads_sofar_, num_threads_);
if (num_threads_ > max_active_threads_sofar_) {
max_active_threads_sofar_ = num_threads_;
}
// Drop lock before spawning thread to avoid contention
lock.unlock();
new WorkerThread(this);

Loading…
Cancel
Save