From 70edf7bedfa3d08eecab550cedc8869b81aaa9f1 Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 9 Jun 2005 11:02:55 +0000 Subject: [PATCH] - No need to make runner volatile since it is only access in synchronized code - Do not null out Logging.runner at the end of Runner.run() - Remove unused Runner.wakeup() method and make runner.run() not synchronized --- src/helma/util/Logging.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/helma/util/Logging.java b/src/helma/util/Logging.java index 25f994fd..09e4ad8a 100644 --- a/src/helma/util/Logging.java +++ b/src/helma/util/Logging.java @@ -32,7 +32,7 @@ import java.util.*; public class Logging extends LogFactory { // we use one static thread for all Loggers - static volatile Runner runner; + static Runner runner; // the list of active loggers static ArrayList loggers = new ArrayList(); @@ -233,7 +233,7 @@ public class Logging extends LogFactory { */ static class Runner extends Thread { - public synchronized void run() { + public void run() { long nextMidnight = nextMidnight(); while ((runner == this) && !isInterrupted()) { @@ -272,12 +272,8 @@ public class Logging extends LogFactory { break; } } - runner = null; } - public synchronized void wakeup() { - notifyAll(); - } } }