summaryrefslogtreecommitdiffstats
path: root/Source/cmServer.cxx
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2017-12-01 19:09:51 (GMT)
committerJustin Berger <j.david.berger@gmail.com>2017-12-01 19:09:51 (GMT)
commit3519c8f2473c40fd6d2ce86e29742ef30b7e11f1 (patch)
treef1a3b792b554aca0c65b467b28bd69a30e0c6961 /Source/cmServer.cxx
parenta4faf8638744edf7e3dd8931b55ba87e8f7738be (diff)
downloadCMake-3519c8f2473c40fd6d2ce86e29742ef30b7e11f1.zip
CMake-3519c8f2473c40fd6d2ce86e29742ef30b7e11f1.tar.gz
CMake-3519c8f2473c40fd6d2ce86e29742ef30b7e11f1.tar.bz2
utilities: Swapped to use std C++11 mutex/threading constructs
Diffstat (limited to 'Source/cmServer.cxx')
-rw-r--r--Source/cmServer.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx
index ac42fde..1b04ca2 100644
--- a/Source/cmServer.cxx
+++ b/Source/cmServer.cxx
@@ -18,6 +18,7 @@
#include <cstdint>
#include <iostream>
#include <memory>
+#include <mutex>
#include <utility>
void on_signal(uv_signal_t* signal, int signum)
@@ -490,7 +491,7 @@ void cmServerBase::StartShutDown()
SIGHUPHandler.reset();
{
- cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+ std::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
for (auto& connection : Connections) {
connection->OnConnectionShuttingDown();
}
@@ -537,7 +538,7 @@ cmServerBase::~cmServerBase()
void cmServerBase::AddNewConnection(cmConnection* ownedConnection)
{
{
- cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+ std::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
Connections.emplace_back(ownedConnection);
}
ownedConnection->SetServer(this);
@@ -554,7 +555,7 @@ void cmServerBase::OnDisconnect(cmConnection* pConnection)
return m.get() == pConnection;
};
{
- cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+ std::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
Connections.erase(
std::remove_if(Connections.begin(), Connections.end(), pred),
Connections.end());