summaryrefslogtreecommitdiff
path: root/src/mongo/shell/shell_utils.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-02-27 18:33:28 -0500
committerAndy Schwerin <schwerin@mongodb.com>2015-03-12 17:11:20 -0400
commit7cd9cf303c824478f0f6d60cadfcc1a25bdb21f2 (patch)
treeebeec8c3c2dc21359b941d95e2109e355542e65f /src/mongo/shell/shell_utils.cpp
parent7ee3d124070db157181bc1b24f2b84913957c388 (diff)
downloadmongo-7cd9cf303c824478f0f6d60cadfcc1a25bdb21f2.tar.gz
SERVER-17310 Make mongo::mutex a typedef of boost::mutex and remove mongo::scoped_lock.
Diffstat (limited to 'src/mongo/shell/shell_utils.cpp')
-rw-r--r--src/mongo/shell/shell_utils.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp
index ee489a75dd4..77cf1103f1d 100644
--- a/src/mongo/shell/shell_utils.cpp
+++ b/src/mongo/shell/shell_utils.cpp
@@ -286,22 +286,20 @@ namespace mongo {
return _confirmed = matchedY;
}
- ConnectionRegistry::ConnectionRegistry() :
- _mutex( "connectionRegistryMutex" ) {
- }
-
+ ConnectionRegistry::ConnectionRegistry() = default;
+
void ConnectionRegistry::registerConnection( DBClientWithCommands &client ) {
BSONObj info;
if ( client.runCommand( "admin", BSON( "whatsmyuri" << 1 ), info ) ) {
string connstr = dynamic_cast<DBClientBase&>( client ).getServerAddress();
- mongo::mutex::scoped_lock lk( _mutex );
+ boost::lock_guard<boost::mutex> lk( _mutex );
_connectionUris[ connstr ].insert( info[ "you" ].str() );
}
}
void ConnectionRegistry::killOperationsOnAllConnections( bool withPrompt ) const {
Prompter prompter( "do you want to kill the current op(s) on the server?" );
- mongo::mutex::scoped_lock lk( _mutex );
+ boost::lock_guard<boost::mutex> lk( _mutex );
for( map<string,set<string> >::const_iterator i = _connectionUris.begin();
i != _connectionUris.end(); ++i ) {
string errmsg;