| LEFT | RIGHT |
| 1 #include <stdexcept> | 1 #include <stdexcept> |
| 2 #include <functional> | 2 #include <functional> |
| 3 #include <wctype.h> | 3 #include <wctype.h> |
| 4 // <thread> is C++11, but implemented in VS2012 | 4 // <thread> is C++11, but implemented in VS2012 |
| 5 #include <thread> | 5 #include <thread> |
| 6 | 6 |
| 7 #include "installer-lib.h" | 7 #include "installer-lib.h" |
| 8 #include "process.h" | 8 #include "process.h" |
| 9 #include "handle.h" | 9 #include "handle.h" |
| 10 #include "session.h" | 10 #include "session.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 * The present use of this method is not closing dozens of applications, so delay
performance is not critical. | 220 * The present use of this method is not closing dozens of applications, so delay
performance is not critical. |
| 221 * | 221 * |
| 222 * \return | 222 * \return |
| 223 * The negation of is_running. | 223 * The negation of is_running. |
| 224 * If is_running() was true at the beginning, then this function will have run
refresh() before returning. | 224 * If is_running() was true at the beginning, then this function will have run
refresh() before returning. |
| 225 * | 225 * |
| 226 * \sa | 226 * \sa |
| 227 * - MSDN [WM_QUERYENDSESSION message](http://msdn.microsoft.com/en-us/library/
windows/desktop/aa376890%28v=vs.85%29.aspx) | 227 * - MSDN [WM_QUERYENDSESSION message](http://msdn.microsoft.com/en-us/library/
windows/desktop/aa376890%28v=vs.85%29.aspx) |
| 228 * - MSDN [WM_ENDSESSION message](http://msdn.microsoft.com/en-us/library/windo
ws/desktop/aa376889%28v=vs.85%29.aspx) | 228 * - MSDN [WM_ENDSESSION message](http://msdn.microsoft.com/en-us/library/windo
ws/desktop/aa376889%28v=vs.85%29.aspx) |
| 229 */ | 229 */ |
| 230 bool ProcessCloser::shutDown() | 230 bool ProcessCloser::ShutDown() |
| 231 { | 231 { |
| 232 /* | 232 /* |
| 233 * If we're not running, we don't need to shut down. | 233 * If we're not running, we don't need to shut down. |
| 234 */ | 234 */ |
| 235 if ( ! isRunning() ) | 235 if ( ! IsRunning() ) |
| 236 { | 236 { |
| 237 return true ; | 237 return true ; |
| 238 } | 238 } |
| 239 | 239 |
| 240 /* | 240 /* |
| 241 * Shutting down is a structure as an escalating series of attempts to shut dow
n. | 241 * Shutting down is a structure as an escalating series of attempts to shut dow
n. |
| 242 * After each one, we wait to see if the shut down has completed. | 242 * After each one, we wait to see if the shut down has completed. |
| 243 * Even though we're using a blocking call to send messages, applications need
not block before exiting. | 243 * Even though we're using a blocking call to send messages, applications need
not block before exiting. |
| 244 * Internet Explorer, in particular, does not. | 244 * Internet Explorer, in particular, does not. |
| 245 * | 245 * |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 */ | 295 */ |
| 296 return false ; | 296 return false ; |
| 297 } | 297 } |
| 298 | 298 |
| 299 /* | 299 /* |
| 300 * Wait loop. | 300 * Wait loop. |
| 301 */ | 301 */ |
| 302 for ( unsigned int j = 0 ; j < 50 ; ++ j ) | 302 for ( unsigned int j = 0 ; j < 50 ; ++ j ) |
| 303 { | 303 { |
| 304 std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) ) ; | 304 std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) ) ; |
| 305 refresh() ; | 305 Refresh() ; |
| 306 if ( ! isRunning() ) | 306 if ( ! IsRunning() ) |
| 307 { | 307 { |
| 308 return true ; | 308 return true ; |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 // Assert is_running() | 311 // Assert is_running() |
| 312 } | 312 } |
| 313 // No control path leaves the for-loop. | 313 // No control path leaves the for-loop. |
| 314 } ; | 314 } ; |
| 315 | 315 |
| LEFT | RIGHT |