summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2010-06-02 16:04:33 -0400
committerDwight <dwight@10gen.com>2010-06-02 16:04:33 -0400
commite90228a360f63736c8e3ca9fca7d5d4d78dcb643 (patch)
tree96f9f5c023048ffdc9f595134d5dbe29f4d3bf3d /util
parent456d6a28d3add143def3614982d77c609fa9276e (diff)
downloadmongo-e90228a360f63736c8e3ca9fca7d5d4d78dcb643.tar.gz
mutexdebugger
Diffstat (limited to 'util')
-rw-r--r--util/concurrency/mutex.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/util/concurrency/mutex.h b/util/concurrency/mutex.h
index fac91bcd51c..87eda63a13c 100644
--- a/util/concurrency/mutex.h
+++ b/util/concurrency/mutex.h
@@ -50,14 +50,16 @@ namespace mongo {
if ( followers[m].count(*i) != 0 ){
failed = true;
stringstream ss;
- ss << "mid: " << m << " followers[m] first: " << *(followers[m].begin());
+ ss << "mutex problem" <<
+ "\n when locking " << m <<
+ "\n " << *i << " was already locked and should not be.";
err = ss.str();
break;
}
}
}
- if ( failed ){
- cout << "ERROR with mutex: " << err << endl;
+ if( failed ) {
+ cout << err << endl;
assert( 0 );
}
preceeding->insert(m);