Be explicit about our Interval usage.

In AuditLogger, we roll over the audit log on the Interval timer thread, which
is dubious, because it could block, but introducing an Invoker thread here
would require a ticket on a boat that sailed a long time ago. In the case of
SerialExecutor, we're just doing Thread.kill() on the Interval timer thread, so
that's fast enough.
This commit is contained in:
Michael Bayne
2011-06-17 12:24:24 -07:00
parent 85efd40adf
commit 402cdfdc29
2 changed files with 3 additions and 4 deletions
@@ -166,7 +166,7 @@ public class AuditLogger
}
/** The interval that rolls over the log file. */
protected Interval _rollover = new Interval() {
protected Interval _rollover = new Interval(Interval.RUN_DIRECT) {
@Override public void expired () {
checkRollOver();
}
@@ -135,9 +135,8 @@ public class SerialExecutor
final ExecutorThread thread = new ExecutorThread(task);
thread.start();
// start up a timer that will abort this thread after the specified
// timeout
new Interval() {
// start up a timer that will abort this thread after the specified timeout
new Interval(Interval.RUN_DIRECT) {
@Override public void expired () {
// this will NOOP if the task has already completed
thread.abort();