From: Chris Koeritz Date: Fri, 24 Oct 2014 14:43:33 +0000 (-0400) Subject: just formatting. X-Git-Tag: 2.140.90~746 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=d65c39dbb9cbe8f3dca3eb9f63889c31da3cd8c5 just formatting. --- diff --git a/kona/src/org/feistymeow/process/ethread.java b/kona/src/org/feistymeow/process/ethread.java index 6bd87ad7..26f70745 100644 --- a/kona/src/org/feistymeow/process/ethread.java +++ b/kona/src/org/feistymeow/process/ethread.java @@ -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); } - + } } -