summaryrefslogtreecommitdiff
path: root/src/mongo/s/cluster_last_error_info.h
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-09-17 23:22:19 +0000
committerevergreen <evergreen@mongodb.com>2019-09-17 23:22:19 +0000
commitbc11369435ca51e2ff6897433d00f6b909f6a25f (patch)
tree251653ec8285d798b41846e343e7e414e80ff277 /src/mongo/s/cluster_last_error_info.h
parent45aea2495306dd61fab46bd398735bb6aaf7b53a (diff)
downloadmongo-bc11369435ca51e2ff6897433d00f6b909f6a25f.tar.gz
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/s/cluster_last_error_info.h')
-rw-r--r--src/mongo/s/cluster_last_error_info.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/s/cluster_last_error_info.h b/src/mongo/s/cluster_last_error_info.h
index 0cc07fa27ac..af13045099d 100644
--- a/src/mongo/s/cluster_last_error_info.h
+++ b/src/mongo/s/cluster_last_error_info.h
@@ -63,7 +63,7 @@ public:
* gets shards used on the previous request
*/
std::set<std::string>* getPrevShardHosts() const {
- stdx::lock_guard<stdx::mutex> lock(_mutex);
+ stdx::lock_guard<Latch> lock(_mutex);
return &_prev->shardHostsWritten;
}
@@ -71,7 +71,7 @@ public:
* Gets the shards, hosts, and opTimes the client last wrote to with write commands.
*/
const HostOpTimeMap& getPrevHostOpTimes() const {
- stdx::lock_guard<stdx::mutex> lock(_mutex);
+ stdx::lock_guard<Latch> lock(_mutex);
return _prev->hostOpTimes;
}
@@ -89,7 +89,7 @@ private:
};
// Protects _infos, _cur, and _prev.
- mutable stdx::mutex _mutex;
+ mutable Mutex _mutex = MONGO_MAKE_LATCH("ClusterLastErrorInfo::_mutex");
// We use 2 so we can flip for getLastError type operations.
RequestInfo _infos[2];