summaryrefslogtreecommitdiff
path: root/src/mongo/executor/network_interface_integration_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/executor/network_interface_integration_test.cpp')
-rw-r--r--src/mongo/executor/network_interface_integration_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/executor/network_interface_integration_test.cpp b/src/mongo/executor/network_interface_integration_test.cpp
index f897d814409..644ea630973 100644
--- a/src/mongo/executor/network_interface_integration_test.cpp
+++ b/src/mongo/executor/network_interface_integration_test.cpp
@@ -166,14 +166,14 @@ public:
RemoteCommandResponse response;
};
IsMasterData waitForIsMaster() {
- stdx::unique_lock<stdx::mutex> lk(_mutex);
+ stdx::unique_lock<Latch> lk(_mutex);
_isMasterCond.wait(lk, [this] { return _isMasterResult != boost::none; });
return std::move(*_isMasterResult);
}
bool hasIsMaster() {
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
return _isMasterResult != boost::none;
}
@@ -185,7 +185,7 @@ private:
Status validateHost(const HostAndPort& host,
const BSONObj& request,
const RemoteCommandResponse& isMasterReply) override {
- stdx::lock_guard<stdx::mutex> lk(_parent->_mutex);
+ stdx::lock_guard<Latch> lk(_parent->_mutex);
_parent->_isMasterResult = IsMasterData{request, isMasterReply};
_parent->_isMasterCond.notify_all();
return Status::OK();
@@ -203,7 +203,7 @@ private:
NetworkInterfaceTest* _parent;
};
- stdx::mutex _mutex;
+ Mutex _mutex = MONGO_MAKE_LATCH("NetworkInterfaceTest::_mutex");
stdx::condition_variable _isMasterCond;
boost::optional<IsMasterData> _isMasterResult;
};