summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Li <alex.li@mongodb.com>2021-06-17 20:40:55 +0000
committerAlex Li <alex.li@mongodb.com>2021-06-23 16:13:19 +0000
commit1f68be5545592b9cb7ee8593422760bad714101e (patch)
tree2886102e51b4c087df014ae06343da7c4ed6cf97
parentd5d9237dee61f5a7c30b0c4698a0a93a87716979 (diff)
downloadmongo-1f68be5545592b9cb7ee8593422760bad714101e.tar.gz
SERVER-55949 CancellationState::isCanceled and isCancelable use load instead of loadRelaxed
(cherry picked from commit 7916b72cd1082330e05d5fd052e099f3387ca513)
-rw-r--r--src/mongo/util/cancellation.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/util/cancellation.h b/src/mongo/util/cancellation.h
index a90837b91d0..5a112a1bca7 100644
--- a/src/mongo/util/cancellation.h
+++ b/src/mongo/util/cancellation.h
@@ -88,7 +88,7 @@ public:
}
bool isCanceled() const {
- return _state.loadRelaxed() == State::kCanceled;
+ return _state.load() == State::kCanceled;
}
SharedSemiFuture<void> onCancel() const {
@@ -99,7 +99,7 @@ public:
* Returns true if neither cancel() nor dismiss() has been called.
*/
bool isCancelable() const {
- return _state.loadRelaxed() == State::kInit;
+ return _state.load() == State::kInit;
}
private: