diff options
author | Alberto Lerner <alerner@10gen.com> | 2012-11-19 18:41:19 -0500 |
---|---|---|
committer | Alberto Lerner <alerner@10gen.com> | 2012-11-19 22:11:46 -0500 |
commit | c9d95847ffdb2f42387066fd00edb2588c4fadef (patch) | |
tree | 72b51afd6f88d82ca0859143f93cab86bef43eb5 /src/mongo/db/curop.h | |
parent | b8b020232b893c55056fdacffd51a13dc3546725 (diff) | |
download | mongo-c9d95847ffdb2f42387066fd00edb2588c4fadef.tar.gz |
SERVER-7610 Introduced relaxed reads on an atomic int and used it on the kill pending accessor.
Diffstat (limited to 'src/mongo/db/curop.h')
-rw-r--r-- | src/mongo/db/curop.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h index 8d2c060750d..5c023bcc4fc 100644 --- a/src/mongo/db/curop.h +++ b/src/mongo/db/curop.h @@ -224,7 +224,8 @@ namespace mongo { ProgressMeter& getProgressMeter() { return _progressMeter; } CurOp *parent() const { return _wrapped; } void kill(bool* pNotifyFlag = NULL); - bool killPending() const { return _killPending; } + bool killPendingStrict() const { return _killPending.load(); } + bool killPending() const { return _killPending.loadRelaxed(); } void yielded() { _numYields++; } int numYields() const { return _numYields; } void suppressFromCurop() { _suppressFromCurop = true; } @@ -259,7 +260,7 @@ namespace mongo { OpDebug _debug; ThreadSafeString _message; ProgressMeter _progressMeter; - volatile bool _killPending; + AtomicInt32 _killPending; int _numYields; LockStat _lockStat; // _notifyList is protected by the global killCurrentOp's mtx. |