1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

synchronize the updating.

This commit is contained in:
Mikhail Khodjaiants 2005-07-29 17:58:16 +00:00
parent 09ed69dcb6
commit a644748bb8

View file

@ -200,7 +200,7 @@ public class Target extends SessionObject implements ICDITarget {
/** /**
* Called when stopping because of breakpoints etc .. * Called when stopping because of breakpoints etc ..
*/ */
public void updateState(int newThreadId) { public synchronized void updateState(int newThreadId) {
Thread[] oldThreads = currentThreads; Thread[] oldThreads = currentThreads;
// If we use "info threads" in getCThreads() this // 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() * @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) { if (currentThreads.length == 0) {
currentThreads = getCThreads(); currentThreads = getCThreads();
} }