From e721e9df43caf1433040dde1fd7ff54384f2497d Mon Sep 17 00:00:00 2001 From: Jason Rassi Date: Fri, 26 Jul 2013 12:05:39 -0400 Subject: SERVER-2212 Misc. comments, formatting --- src/mongo/db/kill_current_op.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/mongo/db/kill_current_op.cpp') 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 ""; } -- cgit v1.2.1