From a644748bb86a0154cccde9abee0455e7a0cd7c85 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Fri, 29 Jul 2005 17:58:16 +0000 Subject: [PATCH] synchronize the updating. --- .../cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java index 53d7c2ebc85..66debd39145 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Target.java @@ -200,7 +200,7 @@ public class Target extends SessionObject implements ICDITarget { /** * Called when stopping because of breakpoints etc .. */ - public void updateState(int newThreadId) { + public synchronized void updateState(int newThreadId) { Thread[] oldThreads = currentThreads; // If we use "info threads" in getCThreads() this @@ -338,7 +338,7 @@ public class Target extends SessionObject implements ICDITarget { /** * @see org.eclipse.cdt.debug.core.cdi.model.ICDITarget#getThreads() */ - public ICDIThread[] getThreads() throws CDIException { + public synchronized ICDIThread[] getThreads() throws CDIException { if (currentThreads.length == 0) { currentThreads = getCThreads(); }