Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2012-12-05 18:32:08 -0500
committerPatrick Tasse2012-12-06 11:04:14 -0500
commit9474b3a1da318e1edb090941bbcfe78e8cf0cede (patch)
tree8d1f725c6b3e17e81508e22c9337d1ea0b537b46
parent2551d61f2066fd6d1e04c68dd6dd8b70a1681621 (diff)
downloadorg.eclipse.linuxtools-9474b3a1da318e1edb090941bbcfe78e8cf0cede.tar.gz
org.eclipse.linuxtools-9474b3a1da318e1edb090941bbcfe78e8cf0cede.tar.xz
org.eclipse.linuxtools-9474b3a1da318e1edb090941bbcfe78e8cf0cede.zip
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>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsCache.java3
1 files changed, 3 insertions, 0 deletions
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 69098bc9d7..60e90767fa 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 @@ public class TmfEventsCache {
* 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;

Back to the top