* java/util/Timer.java (TaskQueue.isStopped): Remove method.
(Scheduler.run): Try to re-schedule task and ignore exception if
queue has been stopped.
From-SVN: r47093
+2001-11-16 Mark Wielaard <mark@klomp.org>
+
+ * java/util/Timer.java (TaskQueue.isStopped): Remove method.
+ (Scheduler.run): Try to re-schedule task and ignore exception if
+ queue has been stopped.
+
2001-11-15 Tom Tromey <tromey@redhat.com>
* verify.cc (type::compatible): Use _Jv_IsAssignableFrom.
this.notify();
}
- /**
- * This method returns <code>true</code> if the queue has been
- * stopped.
- */
- public synchronized boolean isStopped ()
- {
- return this.heap == null;
- }
} // TaskQueue
/**
}
// Calculate next time and possibly re-enqueue.
- // Don't bother re-scheduling if the queue has been stopped.
- if (! queue.isStopped () && task.scheduled >= 0)
+ if (task.scheduled >= 0)
{
if (task.fixed)
{
{
task.scheduled = task.period + System.currentTimeMillis();
}
- queue.enqueue(task);
+
+ try
+ {
+ queue.enqueue(task);
+ }
+ catch (IllegalStateException ise)
+ {
+ // Ignore. Apparently the Timer queue has been stopped.
+ }
}
}
}