diff options
author | Aaron <aaron@10gen.com> | 2010-03-15 09:42:01 -0700 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-03-15 09:42:01 -0700 |
commit | c971842a5598d50ce178840b33282a832b9d5d82 (patch) | |
tree | f9529392ef0151c60bf9378d12b402afac5da918 /db/instance.cpp | |
parent | 31330598f556770648d260ffcb04dabfd92ba498 (diff) | |
download | mongo-c971842a5598d50ce178840b33282a832b9d5d82.tar.gz |
Revert "Revert "SERVER-695 don't destroy static global mutexes""
This reverts commit eb7cde3e751b02eae055a922af8985fe52c807fa.
Conflicts:
db/instance.h
Diffstat (limited to 'db/instance.cpp')
-rw-r--r-- | db/instance.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db/instance.cpp b/db/instance.cpp index 3e633312dd3..0baacd1c6dc 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -76,7 +76,7 @@ namespace mongo { // see FSyncCommand: unsigned lockedForWriting; - boost::mutex lockedForWritingMutex; + mongo::mutex lockedForWritingMutex; bool unlockRequested = false; void inProgCmd( Message &m, DbResponse &dbresponse ) { @@ -93,7 +93,7 @@ namespace mongo { vector<BSONObj> vals; { Client& me = cc(); - boostlock bl(Client::clientsMutex); + scoped_lock bl(Client::clientsMutex); for( set<Client*>::iterator i = Client::clients.begin(); i != Client::clients.end(); i++ ) { Client *c = *i; if ( c == &me ) @@ -588,7 +588,7 @@ namespace mongo { void recCacheCloseAll(); - boost::mutex &exitMutex( *( new boost::mutex ) ); + mongo::mutex exitMutex; int numExitCalls = 0; void shutdown(); @@ -616,7 +616,7 @@ namespace mongo { void dbexit( ExitCode rc, const char *why) { Client * c = currentClient.get(); { - boostlock lk( exitMutex ); + scoped_lock lk( exitMutex ); if ( numExitCalls++ > 0 ) { if ( numExitCalls > 5 ){ // this means something horrible has happened |