summaryrefslogtreecommitdiff
path: root/src/mongo/db/concurrency/locker.h
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2014-12-10 17:15:45 -0500
committerGeert Bosch <geert@mongodb.com>2014-12-12 18:05:34 -0500
commite067fff4e3f3079d070ec168f32c24db9a51a944 (patch)
tree5ccdf8c4cbae815a7d485a30c4d2d5bfbdf3aaaa /src/mongo/db/concurrency/locker.h
parent2a148f717998b77199c3dd3d7d4e4e47eb1141ef (diff)
downloadmongo-e067fff4e3f3079d070ec168f32c24db9a51a944.tar.gz
SERVER-16493: Have Client own Locker to amortize initialization cost
Diffstat (limited to 'src/mongo/db/concurrency/locker.h')
-rw-r--r--src/mongo/db/concurrency/locker.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h
index 352ab67328c..94caf497c7c 100644
--- a/src/mongo/db/concurrency/locker.h
+++ b/src/mongo/db/concurrency/locker.h
@@ -258,6 +258,10 @@ namespace mongo {
virtual bool isWriteLocked() const = 0;
virtual bool isReadLocked() const = 0;
+ // This asserts we're not in a WriteUnitOfWork, and there are no requests on the Locker,
+ // so it would be safe to call the destructor or reuse the Locker.
+ virtual void assertEmpty() const = 0;
+
/**
* Pending means we are currently trying to get a lock (could be the parallel batch writer
* lock).