commit | 723907835a27adc8b6e74fa6fc2c60b56c1b6b21 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Thu Aug 18 11:15:46 2016 -0700 |
committer | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Tue Aug 30 13:29:14 2016 -0700 |
tree | fdbe425252c6b8d88fdee34fec285d4862d814d1 | |
parent | 3032af15c096bd7bdb276027d097569579078c70 [diff] |
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
diff --git a/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java b/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java index 80f9751..1647eff 100644 --- a/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java +++ b/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java
@@ -68,7 +68,7 @@ private static final Event KILL_PILL = new AbstractEvent(null, 0) { }; - private DispatchLoop dispatchLoop; + private volatile DispatchLoop dispatchLoop; private long maxProcessMillis = DEFAULT_EXECUTE_MS; // Means to detect long-running sinks