diff options
author | Dwight <dwight@10gen.com> | 2010-06-02 16:04:33 -0400 |
---|---|---|
committer | Dwight <dwight@10gen.com> | 2010-06-02 16:04:33 -0400 |
commit | e90228a360f63736c8e3ca9fca7d5d4d78dcb643 (patch) | |
tree | 96f9f5c023048ffdc9f595134d5dbe29f4d3bf3d /util | |
parent | 456d6a28d3add143def3614982d77c609fa9276e (diff) | |
download | mongo-e90228a360f63736c8e3ca9fca7d5d4d78dcb643.tar.gz |
mutexdebugger
Diffstat (limited to 'util')
-rw-r--r-- | util/concurrency/mutex.h | 8 |
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); |