diff options
author | Mathias Stearn <mathias@10gen.com> | 2012-11-15 17:24:59 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2012-11-19 14:10:42 -0500 |
commit | ddd8f52f5aa548c021841c89ef35485ba5876726 (patch) | |
tree | 5861c4d9f3e1351126a13767931137b195952f2e /src/mongo/db/curop.cpp | |
parent | 74da78e550430d742a29439bf7d126ea0ff3e739 (diff) | |
download | mongo-ddd8f52f5aa548c021841c89ef35485ba5876726.tar.gz |
SERVER-7610 use volatile bool for _killPending flag rather than AtomicInt32
10x faster
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index fd3429c9b59..b920bf22df2 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -47,7 +47,7 @@ namespace mongo { _end = 0; _message = ""; _progressMeter.finished(); - _killPending.store(0); + _killPending = false; killCurrentOp.notifyAllWaiters(); _numYields = 0; _expectedLatencyMs = 0; @@ -193,7 +193,7 @@ namespace mongo { } void CurOp::kill(bool* pNotifyFlag /* = NULL */) { - _killPending.store(1); + _killPending = true; if (pNotifyFlag) { _notifyList.push_back(pNotifyFlag); } |