See the latest value of dispatchLoop
The field, dispatchLoop, is accessed in activate() method and the thread where Watchdog is running. Then, different threads could access the field and could miss the latest value. Change-Id: Id218522f5b318fb3d05833ba57d908a1bf6d2949
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -68,7 +68,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry | ... | @@ -68,7 +68,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry |
68 | private static final Event KILL_PILL = new AbstractEvent(null, 0) { | 68 | private static final Event KILL_PILL = new AbstractEvent(null, 0) { |
69 | }; | 69 | }; |
70 | 70 | ||
71 | - private DispatchLoop dispatchLoop; | 71 | + private volatile DispatchLoop dispatchLoop; |
72 | private long maxProcessMillis = DEFAULT_EXECUTE_MS; | 72 | private long maxProcessMillis = DEFAULT_EXECUTE_MS; |
73 | 73 | ||
74 | // Means to detect long-running sinks | 74 | // Means to detect long-running sinks | ... | ... |
-
Please register or login to post a comment