just formatting.
authorChris Koeritz <fred@gruntose.com>
Fri, 24 Oct 2014 14:43:33 +0000 (10:43 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 24 Oct 2014 14:43:33 +0000 (10:43 -0400)
kona/src/org/feistymeow/process/ethread.java

index 6bd87ad726ddac183676f606fa84f2bdaa96eb76..26f707458a7d63e34a4ef09268bb9b791ceece19 100644 (file)
@@ -128,35 +128,33 @@ public abstract class ethread implements Runnable
        @Override
        public void run()
        {
-                       if (!threadRunning()) {
-                               return; // stopped before it ever started. how can this be? we just got invoked.
-                       }
-                       try {
-                               while (true) {
-                                       boolean keepGoing = performActivity();
-                                       if (!keepGoing) {
-                                               c_logger.debug("thread returned false for single shot thread.  just saying.");
-                                       }
-                                       if (c_period == 0) {
-                                               // not a periodic thread, so we're done now.
+               if (!threadRunning()) {
+                       return; // stopped before it ever started. how can this be? we just got invoked.
+               }
+               try {
+                       while (true) {
+                               boolean keepGoing = performActivity();
+                               if (!keepGoing) {
+                                       c_logger.debug("thread returned false for single shot thread.  just saying.");
+                               }
+                               if (c_period == 0) {
+                                       // not a periodic thread, so we're done now.
+                                       break;
+                               }
+                               long nextRun = System.currentTimeMillis() + c_period;
+                               while (System.currentTimeMillis() < nextRun) {
+                                       if (shouldStop()) {
                                                break;
                                        }
-                                       long nextRun = System.currentTimeMillis() + c_period;
-                                       while (System.currentTimeMillis() < nextRun) {
-                                               if (shouldStop()) {
-                                                       break;
-                                               }
-                                               try {
-                                                       Thread.sleep(SNOOZE_PERIOD);
-                                               } catch (InterruptedException e) {
-                                                       // well, we'll hit it again soon.
-                                               }
+                                       try {
+                                               Thread.sleep(SNOOZE_PERIOD);
+                                       } catch (InterruptedException e) {
+                                               // well, we'll hit it again soon.
                                        }
                                }
-                       } catch (Throwable t) {
-                               c_logger.info("exception thrown from performActivity: " + t.getLocalizedMessage(), t);
                        }
+               } catch (Throwable t) {
+                       c_logger.info("exception thrown from performActivity: " + t.getLocalizedMessage(), t);
                }
-       
+       }
 }
-