Sho SHIMIZU

Read the latest value of dispatchFuture

The field, dispatchFuture, is accessed in activate() method and the thread
where Watchdog is running. Then, different threads could access the field
and couldn't read the latest value.

Change-Id: Iceb390bcf3c5711c1dbb59198667138c8a90b036
...@@ -75,7 +75,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry ...@@ -75,7 +75,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry
75 private TimerTask watchdog; 75 private TimerTask watchdog;
76 private EventSink lastSink; 76 private EventSink lastSink;
77 private final Stopwatch stopwatch = Stopwatch.createUnstarted(); 77 private final Stopwatch stopwatch = Stopwatch.createUnstarted();
78 - private Future<?> dispatchFuture; 78 + private volatile Future<?> dispatchFuture;
79 79
80 @Override 80 @Override
81 public void post(Event event) { 81 public void post(Event event) {
......