diff options
author | Amirsaman Memaripour <amirsaman.memaripour@10gen.com> | 2020-01-16 20:44:59 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-16 20:44:59 +0000 |
commit | 7ba6fede8aab0ab8a77515d7c11a017b213d8f93 (patch) | |
tree | 5b28127f9feefb4db1202a02c61e61371c647f37 /src/mongo/db/client.h | |
parent | bb6e5391a9591139804038b3524a1b92ad1c327b (diff) | |
download | mongo-7ba6fede8aab0ab8a77515d7c11a017b213d8f93.tar.gz |
SERVER-45212 Add try_lock() to SpinLock
Diffstat (limited to 'src/mongo/db/client.h')
-rw-r--r-- | src/mongo/db/client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/client.h b/src/mongo/db/client.h index 6aea69b5c2a..64c0e7407c7 100644 --- a/src/mongo/db/client.h +++ b/src/mongo/db/client.h @@ -152,6 +152,9 @@ public: void unlock() { _lock.unlock(); } + bool try_lock() { + return _lock.try_lock(); + } /** * Makes a new operation context representing an operation on this client. At most |