summaryrefslogtreecommitdiff
path: root/src/mongo/db/concurrency/locker.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/concurrency/locker.h')
-rw-r--r--src/mongo/db/concurrency/locker.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h
index 7c19f421e5c..be9f3ea0730 100644
--- a/src/mongo/db/concurrency/locker.h
+++ b/src/mongo/db/concurrency/locker.h
@@ -48,6 +48,15 @@ class Locker {
public:
virtual ~Locker() {}
+ /**
+ * Require global lock attempts with obtain tickets from 'reading' (for MODE_S and MODE_IS),
+ * and from 'writing' (for MODE_IX), which must have static lifetimes. There is no throttling
+ * for MODE_X, as there can only ever be a single locker using this mode. The throttling is
+ * intended to defend against arge drops in throughput under high load due to too much
+ * concurrency.
+ */
+ static void setGlobalThrottling(class TicketHolder* reading, class TicketHolder* writing);
+
virtual LockerId getId() const = 0;
/**