summaryrefslogtreecommitdiff
path: root/db/concurrency.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-03-12 23:09:51 -0500
committerEliot Horowitz <eliot@10gen.com>2010-03-12 23:09:51 -0500
commit71da97dd221ca1da0ebc3b68974d971bffadc972 (patch)
treefbd5908dd1dae25916884a715c2176cf450958b5 /db/concurrency.h
parent43b2fab5cdcb6f935c68215e81e7977841efb624 (diff)
downloadmongo-71da97dd221ca1da0ebc3b68974d971bffadc972.tar.gz
DEB debugging to make sure we don't have unknown write lockers
Diffstat (limited to 'db/concurrency.h')
-rw-r--r--db/concurrency.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/db/concurrency.h b/db/concurrency.h
index e73f01c1a4e..de8f242d61f 100644
--- a/db/concurrency.h
+++ b/db/concurrency.h
@@ -49,6 +49,7 @@ namespace mongo {
}
string sayClientState();
+ bool haveClient();
void curopWaitingForLock( int type );
void curopGotLock();
@@ -114,6 +115,8 @@ namespace mongo {
void lock() {
//DEV cout << "LOCK" << endl;
+ DEV assert( haveClient() );
+
int s = _state.get();
if( s > 0 ) {
_state.set(s+1);