diff options
author | Mathias Stearn <mathias@10gen.com> | 2018-12-26 14:47:00 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-12-27 19:24:54 -0500 |
commit | aa236ed4f3096c85118f00618eec834c82363527 (patch) | |
tree | 9acf754dd14364af2a8f076ebbab955ab04662c2 /src/mongo/util/concurrency/thread_pool.h | |
parent | 5286b698336889c2bcfb08e8ab7c16334f447511 (diff) | |
download | mongo-aa236ed4f3096c85118f00618eec834c82363527.tar.gz |
SERVER-38295 ReplSetMonitor::getHostOrRefresh should not do anything if maxWait <= 0
Diffstat (limited to 'src/mongo/util/concurrency/thread_pool.h')
-rw-r--r-- | src/mongo/util/concurrency/thread_pool.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/util/concurrency/thread_pool.h b/src/mongo/util/concurrency/thread_pool.h index d6ae8a76c54..1d7e35fbf7e 100644 --- a/src/mongo/util/concurrency/thread_pool.h +++ b/src/mongo/util/concurrency/thread_pool.h @@ -59,6 +59,11 @@ public: * Structure used to configure an instance of ThreadPool. */ struct Options { + // Set maxThreads to this if you don't want to limit the number of threads in the pool. + // Note: the value used here is high enough that it will never be reached, but low enough + // that it won't cause overflows if mixed with signed ints or math. + static constexpr size_t kUnlimited = 1'000'000'000; + // Name of the thread pool. If this string is empty, the pool will be assigned a // name unique to the current process. std::string poolName; |