diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-05 14:44:39 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-10 13:57:23 -0400 |
commit | 936a568c59f7f0ee80f8b50fabe241e54e80e9ae (patch) | |
tree | 34bf705edf5c15dca1226ecca2467d6f79d75032 /src/mongo/db/db.h | |
parent | 85461da82e7aca4285173ab7427cd468bd0f0fc2 (diff) | |
download | mongo-936a568c59f7f0ee80f8b50fabe241e54e80e9ae.tar.gz |
SERVER-13922 Remove dbtemprelease
Diffstat (limited to 'src/mongo/db/db.h')
-rw-r--r-- | src/mongo/db/db.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/mongo/db/db.h b/src/mongo/db/db.h index 5e446bfcd4e..c9a3605c8df 100644 --- a/src/mongo/db/db.h +++ b/src/mongo/db/db.h @@ -38,38 +38,6 @@ namespace mongo { - // todo: relocked is being called when there was no unlock below. - // that is weird. - - /** - * Releases the current lock for the duration of its lifetime. - * - * WARNING: do not put in a smart pointer or any other class. If you absolutely must, you need - * to add the throw(DBException) annotation to it's destructor. - */ - struct dbtemprelease { - Client::Context * _context; - scoped_ptr<Lock::TempRelease> tr; - dbtemprelease(LockState* lockState) { - const Client& c = cc(); - _context = c.getContext(); - invariant(lockState->threadState()); - if( Lock::nested() ) { - massert(10298 , "can't temprelease nested lock", false); - } - if ( _context ) { - _context->unlocked(); - } - tr.reset(new Lock::TempRelease(lockState)); - verify( c.curop() ); - } - ~dbtemprelease() throw(DBException) { - tr.reset(); - if ( _context ) - _context->relocked(); - } - }; - extern void (*snmpInit)(); } // namespace mongo |