diff options
author | Jason Rassi <rassi@10gen.com> | 2013-07-26 12:05:39 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2013-07-26 16:36:07 -0400 |
commit | e721e9df43caf1433040dde1fd7ff54384f2497d (patch) | |
tree | 79f51fc3399d95ad6e1990b78a9f635fe58b2184 /src/mongo/db/kill_current_op.cpp | |
parent | a856222627ce97d1ace25a14d6f2b69e8471a1e6 (diff) | |
download | mongo-e721e9df43caf1433040dde1fd7ff54384f2497d.tar.gz |
SERVER-2212 Misc. comments, formatting
Diffstat (limited to 'src/mongo/db/kill_current_op.cpp')
-rw-r--r-- | src/mongo/db/kill_current_op.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/mongo/db/kill_current_op.cpp b/src/mongo/db/kill_current_op.cpp index d036d11c000..a938489ecc9 100644 --- a/src/mongo/db/kill_current_op.cpp +++ b/src/mongo/db/kill_current_op.cpp @@ -104,24 +104,31 @@ namespace mongo { _condvar.notify_all(); } - void KillCurrentOp::checkForInterrupt( bool heedMutex ) { + void KillCurrentOp::checkForInterrupt(bool heedMutex) { Client& c = cc(); - if ( heedMutex && Lock::somethingWriteLocked() && c.hasWrittenThisPass() ) + + if (heedMutex && Lock::somethingWriteLocked() && c.hasWrittenThisPass()) { return; - if( _globalKill ) - uasserted(11600,"interrupted at shutdown"); - if( c.curop()->killPending() ) { + } + + if (_globalKill) { + uasserted(11600, "interrupted at shutdown"); + } + if (c.curop()->killPending()) { notifyAllWaiters(); - uasserted(11601,"operation was interrupted"); + uasserted(11601, "operation was interrupted"); } } const char * KillCurrentOp::checkForInterruptNoAssert() { Client& c = cc(); - if( _globalKill ) + + if (_globalKill) { return "interrupted at shutdown"; - if( c.curop()->killPending() ) + } + if (c.curop()->killPending()) { return "interrupted"; + } return ""; } |