diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-10-20 17:50:18 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-10-23 14:02:08 -0400 |
commit | 629243d3ec1e0834754574d0dffb59c43d35e85e (patch) | |
tree | 98a63c9944b37d88f0f6579756f3ce65ea114900 /src/mongo/dbtests/threadedtests.cpp | |
parent | ae7861b3333b6b4b940b2a1ab6267a0140294ee9 (diff) | |
download | mongo-629243d3ec1e0834754574d0dffb59c43d35e85e.tar.gz |
SERVER-15614 LockerImpl changes to support diagnostics and deadlock
detection
Doesn't actually implement either, just provides the support and
prerequisites.
* We need to be able to map back from Locker objects to the operations,
* which own them, so introduce a LockerId type.
* Put the internal locking logic in a separate method.
Diffstat (limited to 'src/mongo/dbtests/threadedtests.cpp')
-rw-r--r-- | src/mongo/dbtests/threadedtests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp index ed6bb46dfd3..c649e13e3ad 100644 --- a/src/mongo/dbtests/threadedtests.cpp +++ b/src/mongo/dbtests/threadedtests.cpp @@ -113,7 +113,7 @@ namespace ThreadedTests { virtual void subthread(int tnumber) { Client::initThread("mongomutextest"); - LockerImpl<true> lockState; + LockerImpl<true> lockState(1); mongo::unittest::log().stream() << "Thread " << boost::this_thread::get_id() @@ -234,11 +234,11 @@ namespace ThreadedTests { virtual void validate() { { - LockerImpl<true> ls; + LockerImpl<true> ls(1); Lock::GlobalWrite w(&ls); } { - LockerImpl<true> ls; + LockerImpl<true> ls(1); Lock::GlobalRead r(&ls); } } |