summaryrefslogtreecommitdiff
path: root/src/mongo/executor
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2017-01-05 10:56:41 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2017-01-05 10:56:41 -0500
commitba55f2573976ba570c2319bce9b598f0a660445f (patch)
tree7fc8adb43798e03517933c4e575dcbebe8f42087 /src/mongo/executor
parentf5fbf31650eea903edbbcd2f9ef042b4c39e2ecb (diff)
downloadmongo-ba55f2573976ba570c2319bce9b598f0a660445f.tar.gz
SERVER-25932 Make MONGO_EXPORT_SERVER_PARAMETER use AtomicWord instead of std::atomic
Diffstat (limited to 'src/mongo/executor')
-rw-r--r--src/mongo/executor/task_executor_pool.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/executor/task_executor_pool.cpp b/src/mongo/executor/task_executor_pool.cpp
index 89f0da22ed6..71d796a1a2b 100644
--- a/src/mongo/executor/task_executor_pool.cpp
+++ b/src/mongo/executor/task_executor_pool.cpp
@@ -45,8 +45,9 @@ namespace executor {
MONGO_EXPORT_SERVER_PARAMETER(taskExecutorPoolSize, int, 0);
size_t TaskExecutorPool::getSuggestedPoolSize() {
- if (taskExecutorPoolSize > 0) {
- return taskExecutorPoolSize;
+ auto poolSize = taskExecutorPoolSize.load();
+ if (poolSize > 0) {
+ return poolSize;
}
ProcessInfo p;