diff options
Diffstat (limited to 'src/mongo/client/connpool.cpp')
-rw-r--r-- | src/mongo/client/connpool.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/client/connpool.cpp b/src/mongo/client/connpool.cpp index 79f0aa9801c..b56bec49551 100644 --- a/src/mongo/client/connpool.cpp +++ b/src/mongo/client/connpool.cpp @@ -187,7 +187,7 @@ namespace mongo { DBClientBase* DBConnectionPool::_get(const string& ident , double socketTimeout ) { uassert(17382, "Can't use connection pool during shutdown", !inShutdown()); - boost::lock_guard<boost::mutex> L(_mutex); + stdx::lock_guard<stdx::mutex> L(_mutex); PoolForHost& p = _pools[PoolKey(ident,socketTimeout)]; p.setMaxPoolSize(_maxPoolSize); p.initializeHostName(ident); @@ -196,7 +196,7 @@ namespace mongo { DBClientBase* DBConnectionPool::_finishCreate( const string& host , double socketTimeout , DBClientBase* conn ) { { - boost::lock_guard<boost::mutex> L(_mutex); + stdx::lock_guard<stdx::mutex> L(_mutex); PoolForHost& p = _pools[PoolKey(host,socketTimeout)]; p.setMaxPoolSize(_maxPoolSize); p.initializeHostName(host); @@ -270,7 +270,7 @@ namespace mongo { void DBConnectionPool::release(const string& host, DBClientBase *c) { onRelease(c); - boost::lock_guard<boost::mutex> L(_mutex); + stdx::lock_guard<stdx::mutex> L(_mutex); _pools[PoolKey(host,c->getSoTimeout())].done(this,c); } @@ -280,7 +280,7 @@ namespace mongo { } void DBConnectionPool::flush() { - boost::lock_guard<boost::mutex> L(_mutex); + stdx::lock_guard<stdx::mutex> L(_mutex); for ( PoolMap::iterator i = _pools.begin(); i != _pools.end(); i++ ) { PoolForHost& p = i->second; p.flush(); @@ -288,7 +288,7 @@ namespace mongo { } void DBConnectionPool::clear() { - boost::lock_guard<boost::mutex> L(_mutex); + stdx::lock_guard<stdx::mutex> L(_mutex); LOG(2) << "Removing connections on all pools owned by " << _name << endl; for (PoolMap::iterator iter = _pools.begin(); iter != _pools.end(); ++iter) { iter->second.clear(); @@ -296,7 +296,7 @@ namespace mongo { } void DBConnectionPool::removeHost( const string& host ) { - boost::lock_guard<boost::mutex> L(_mutex); + stdx::lock_guard<stdx::mutex> L(_mutex); LOG(2) << "Removing connections from all pools for host: " << host << endl; for ( PoolMap::iterator i = _pools.begin(); i != _pools.end(); ++i ) { const string& poolHost = i->first.ident; @@ -348,7 +348,7 @@ namespace mongo { BSONObjBuilder bb( b.subobjStart( "hosts" ) ); { - boost::lock_guard<boost::mutex> lk( _mutex ); + stdx::lock_guard<stdx::mutex> lk( _mutex ); for ( PoolMap::iterator i=_pools.begin(); i!=_pools.end(); ++i ) { if ( i->second.numCreated() == 0 ) continue; @@ -432,7 +432,7 @@ namespace mongo { } { - boost::lock_guard<boost::mutex> sl(_mutex); + stdx::lock_guard<stdx::mutex> sl(_mutex); PoolForHost& pool = _pools[PoolKey(hostName, conn->getSoTimeout())]; if (pool.isBadSocketCreationTime(conn->getSockCreationMicroSec())) { return false; @@ -448,7 +448,7 @@ namespace mongo { { // we need to get the connections inside the lock // but we can actually delete them outside - boost::lock_guard<boost::mutex> lk( _mutex ); + stdx::lock_guard<stdx::mutex> lk( _mutex ); for ( PoolMap::iterator i=_pools.begin(); i!=_pools.end(); ++i ) { i->second.getStaleConnections( toDelete ); } |