diff options
author | Rahul Sundararaman <rahul.sundararaman@mongodb.com> | 2019-12-09 18:32:45 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-09 18:32:45 +0000 |
commit | 4f00d6e3d7e54a2d131b8216d4b4ef9bfd7a7c6b (patch) | |
tree | 97b83f3c954bd475f8eb5d94f592eca57a5018f7 /src/mongo/util/background.cpp | |
parent | 1f32f6c3952581833482a1c3b0b7ab913b60943f (diff) | |
download | mongo-4f00d6e3d7e54a2d131b8216d4b4ef9bfd7a7c6b.tar.gz |
SERVER-44155 Validate a subset of latches of all levels
Diffstat (limited to 'src/mongo/util/background.cpp')
-rw-r--r-- | src/mongo/util/background.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp index e0bda9a55d9..9dff4675fc7 100644 --- a/src/mongo/util/background.cpp +++ b/src/mongo/util/background.cpp @@ -44,6 +44,7 @@ #include "mongo/util/concurrency/spin_lock.h" #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/debug_util.h" +#include "mongo/util/hierarchical_acquisition.h" #include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/timer.h" @@ -80,7 +81,7 @@ private: void _runTask(PeriodicTask* task); // _mutex protects the _shutdownRequested flag and the _tasks vector. - Mutex _mutex = MONGO_MAKE_LATCH("PeriodicTaskRunner::_mutex"); + Mutex _mutex = MONGO_MAKE_LATCH(HierarchicalAcquisitionLevel(0), "PeriodicTaskRunner::_mutex"); // The condition variable is used to sleep for the interval between task // executions, and is notified when the _shutdownRequested flag is toggled. |