Avoid rereading our volatile variable because it could result in multithread

weirdness.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1934 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2006-09-29 02:41:00 +00:00
parent 09ac6097a6
commit 5700a7a26f
+2 -1
View File
@@ -100,7 +100,8 @@ public abstract class Interval
public final void schedule (long initialDelay, long repeatDelay)
{
cancel();
TimerTask task = _task = new IntervalTask();
TimerTask task = new IntervalTask();
_task = task;
if (repeatDelay == 0L) {
_timer.schedule(task, initialDelay);