mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
Fix windows build by using consistent map type
This commit is contained in:
parent
a072c12c30
commit
d4c9571a5a
@ -145,7 +145,7 @@ namespace mongo {
|
|||||||
|
|
||||||
void DBConnectionPool::flush() {
|
void DBConnectionPool::flush() {
|
||||||
scoped_lock L(_mutex);
|
scoped_lock L(_mutex);
|
||||||
for ( map<string,PoolForHost>::iterator i = _pools.begin(); i != _pools.end(); i++ ) {
|
for ( PoolMap::iterator i = _pools.begin(); i != _pools.end(); i++ ) {
|
||||||
PoolForHost& p = i->second;
|
PoolForHost& p = i->second;
|
||||||
p.flush();
|
p.flush();
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ namespace mongo {
|
|||||||
|
|
||||||
{
|
{
|
||||||
scoped_lock lk( _mutex );
|
scoped_lock lk( _mutex );
|
||||||
for ( map<string,PoolForHost>::iterator i=_pools.begin(); i!=_pools.end(); ++i ) {
|
for ( PoolMap::iterator i=_pools.begin(); i!=_pools.end(); ++i ) {
|
||||||
string s = i->first;
|
string s = i->first;
|
||||||
BSONObjBuilder temp( bb.subobjStart( s ) );
|
BSONObjBuilder temp( bb.subobjStart( s ) );
|
||||||
temp.append( "available" , i->second.numAvailable() );
|
temp.append( "available" , i->second.numAvailable() );
|
||||||
|
@ -107,7 +107,8 @@ namespace mongo {
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
mongo::mutex _mutex;
|
mongo::mutex _mutex;
|
||||||
map<string,PoolForHost,serverNameCompare> _pools; // servername -> pool
|
typedef map<string,PoolForHost,serverNameCompare> PoolMap; // servername -> pool
|
||||||
|
PoolMap _pools;
|
||||||
list<DBConnectionHook*> _hooks;
|
list<DBConnectionHook*> _hooks;
|
||||||
string _name;
|
string _name;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user