summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-03-15 09:42:01 -0700
committerAaron <aaron@10gen.com>2010-03-15 09:42:01 -0700
commitc971842a5598d50ce178840b33282a832b9d5d82 (patch)
treef9529392ef0151c60bf9378d12b402afac5da918 /scripting
parent31330598f556770648d260ffcb04dabfd92ba498 (diff)
downloadmongo-c971842a5598d50ce178840b33282a832b9d5d82.tar.gz
Revert "Revert "SERVER-695 don't destroy static global mutexes""
This reverts commit eb7cde3e751b02eae055a922af8985fe52c807fa. Conflicts: db/instance.h
Diffstat (limited to 'scripting')
-rw-r--r--scripting/engine.cpp6
-rw-r--r--scripting/engine_spidermonkey.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/scripting/engine.cpp b/scripting/engine.cpp
index 0dff413dbde..cc245b66a47 100644
--- a/scripting/engine.cpp
+++ b/scripting/engine.cpp
@@ -243,7 +243,7 @@ namespace mongo {
}
void done( const string& pool , Scope * s ){
- boostlock lk( _mutex );
+ scoped_lock lk( _mutex );
list<Scope*> & l = _pools[pool];
if ( l.size() > 10 ){
delete s;
@@ -255,7 +255,7 @@ namespace mongo {
}
Scope * get( const string& pool ){
- boostlock lk( _mutex );
+ scoped_lock lk( _mutex );
list<Scope*> & l = _pools[pool];
if ( l.size() == 0 )
return 0;
@@ -283,7 +283,7 @@ namespace mongo {
private:
PoolToScopes _pools;
- boost::mutex _mutex;
+ mongo::mutex _mutex;
int _magic;
};
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp
index 490058764d6..cad336df102 100644
--- a/scripting/engine_spidermonkey.cpp
+++ b/scripting/engine_spidermonkey.cpp
@@ -46,7 +46,7 @@ namespace mongo {
boost::thread_specific_ptr<SMScope> currentScope( dontDeleteScope );
boost::recursive_mutex &smmutex = *( new boost::recursive_mutex );
-#define smlock recursive_boostlock ___lk( smmutex );
+#define smlock recursive_scoped_lock ___lk( smmutex );
#define GETHOLDER(x,o) ((BSONHolder*)JS_GetPrivate( x , o ))