* java/util/Timer.java (TaskQueue.isStopped): New method.
(Scheduler.run): Don't re-schedule task if queue has been
stopped.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46994
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-11-13 Tom Tromey <tromey@redhat.com>
+
+ Fix for PR libgcj/4859:
+ * java/util/Timer.java (TaskQueue.isStopped): New method.
+ (Scheduler.run): Don't re-schedule task if queue has been
+ stopped.
+
2001-11-07 Tom Tromey <tromey@redhat.com>
* Makefile.in: Rebuilt.
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
- if (task.scheduled >= 0)
+ // 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.fixed)
{