Read the latest value of lastSink
Multiple threads could access the field, lastSink, then they should read the latest value of lastSink Change-Id: I279ed6fa3db357008603cde5cb2c57671e66b33c
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -73,7 +73,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry | ... | @@ -73,7 +73,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry |
73 | 73 | ||
74 | // Means to detect long-running sinks | 74 | // Means to detect long-running sinks |
75 | private TimerTask watchdog; | 75 | private TimerTask watchdog; |
76 | - private EventSink lastSink; | 76 | + private volatile EventSink lastSink; |
77 | private final Stopwatch stopwatch = Stopwatch.createUnstarted(); | 77 | private final Stopwatch stopwatch = Stopwatch.createUnstarted(); |
78 | private volatile Future<?> dispatchFuture; | 78 | private volatile Future<?> dispatchFuture; |
79 | 79 | ... | ... |
-
Please register or login to post a comment