summaryrefslogtreecommitdiff
path: root/src/mongo/util/concurrency/thread_pool_test_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/concurrency/thread_pool_test_common.cpp')
-rw-r--r--src/mongo/util/concurrency/thread_pool_test_common.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/util/concurrency/thread_pool_test_common.cpp b/src/mongo/util/concurrency/thread_pool_test_common.cpp
index 5f32e649c65..33ff3cb303b 100644
--- a/src/mongo/util/concurrency/thread_pool_test_common.cpp
+++ b/src/mongo/util/concurrency/thread_pool_test_common.cpp
@@ -35,8 +35,8 @@
#include <memory>
-#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/mutex.h"
+#include "mongo/platform/condition_variable.h"
+#include "mongo/platform/mutex.h"
#include "mongo/unittest/death_test.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/concurrency/thread_pool_interface.h"
@@ -203,10 +203,10 @@ COMMON_THREAD_POOL_TEST(RepeatedScheduleDoesntSmashStack) {
auto& pool = getThreadPool();
std::function<void()> func;
std::size_t n = 0;
- stdx::mutex mutex;
+ auto mutex = MONGO_MAKE_LATCH();
stdx::condition_variable condvar;
func = [&pool, &n, &func, &condvar, &mutex, depth]() {
- stdx::unique_lock<stdx::mutex> lk(mutex);
+ stdx::unique_lock<Latch> lk(mutex);
if (n < depth) {
n++;
lk.unlock();
@@ -223,7 +223,7 @@ COMMON_THREAD_POOL_TEST(RepeatedScheduleDoesntSmashStack) {
pool.startup();
pool.join();
- stdx::unique_lock<stdx::mutex> lk(mutex);
+ stdx::unique_lock<Latch> lk(mutex);
condvar.wait(lk, [&n, depth] { return n == depth; });
}