commit | 9474b3a1da318e1edb090941bbcfe78e8cf0cede | [log] [tgz] |
---|---|---|
author | Patrick Tasse <patrick.tasse@gmail.com> | Wed Dec 05 18:32:08 2012 -0500 |
committer | Patrick Tasse <patrick.tasse@gmail.com> | Thu Dec 06 11:04:14 2012 -0500 |
tree | 8d1f725c6b3e17e81508e22c9337d1ea0b537b46 | |
parent | 2551d61f2066fd6d1e04c68dd6dd8b70a1681621 [diff] |
Fix corrupted cache when clear interrupts cache population request Change-Id: Ifebd1362ebfdaafcf0d13140c927680400580aed Reviewed-on: https://git.eclipse.org/r/9052 Tested-by: Hudson CI Reviewed-by: Bernd Hufmann <bhufmann@gmail.com> IP-Clean: Bernd Hufmann <bhufmann@gmail.com> Tested-by: Bernd Hufmann <bhufmann@gmail.com>
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsCache.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsCache.java index 69098bc..60e9076 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsCache.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsCache.java
@@ -100,6 +100,9 @@ * Clear the current contents of this cache. */ public synchronized void clear() { + if (job != null && job.getState() != Job.NONE) { + job.cancel(); + } Arrays.fill(fCache, null); fCacheStartIndex = 0; fCacheEndIndex = 0;