diff options
author | Amirsaman Memaripour <amirsaman.memaripour@10gen.com> | 2020-02-07 14:22:43 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-02-07 14:22:43 +0000 |
commit | 592bb96b9cd7c00b8741afaec23152ec7adc4909 (patch) | |
tree | 3dbc7359b01810d034a9bb8e4a1900e3b6cf6886 | |
parent | 0f36fdce71df08aa7c0703bda69a7045f96f41c8 (diff) | |
download | mongo-592bb96b9cd7c00b8741afaec23152ec7adc4909.tar.gz |
SERVER-45932 Use getNumAvailableCores() in TaskExecutorPool
-rw-r--r-- | src/mongo/executor/task_executor_pool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/executor/task_executor_pool.cpp b/src/mongo/executor/task_executor_pool.cpp index 2f7bd5d95d8..01cab1897a3 100644 --- a/src/mongo/executor/task_executor_pool.cpp +++ b/src/mongo/executor/task_executor_pool.cpp @@ -48,10 +48,10 @@ size_t TaskExecutorPool::getSuggestedPoolSize() { } ProcessInfo p; - unsigned numCores = p.getNumCores(); + auto numCores = p.getNumAvailableCores(); // Never suggest a number outside the range [4, 64]. - return std::max(4U, std::min(64U, numCores)); + return std::max<size_t>(4U, std::min<size_t>(64U, numCores)); } void TaskExecutorPool::startup() { |