summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmirsaman Memaripour <amirsaman.memaripour@10gen.com>2020-02-07 14:22:43 +0000
committerevergreen <evergreen@mongodb.com>2020-02-07 14:22:43 +0000
commit592bb96b9cd7c00b8741afaec23152ec7adc4909 (patch)
tree3dbc7359b01810d034a9bb8e4a1900e3b6cf6886
parent0f36fdce71df08aa7c0703bda69a7045f96f41c8 (diff)
downloadmongo-592bb96b9cd7c00b8741afaec23152ec7adc4909.tar.gz
SERVER-45932 Use getNumAvailableCores() in TaskExecutorPool
-rw-r--r--src/mongo/executor/task_executor_pool.cpp4
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() {