1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 11:55:40 +02:00

Remove the delay of 10 seconds in Target.suspend() and put in MIInferior.interrupt()

This commit is contained in:
Alain Magloire 2003-04-22 20:56:16 +00:00
parent 30b5b45010
commit b7fc69bdac
2 changed files with 7 additions and 6 deletions

View file

@ -179,6 +179,13 @@ public class MIInferior extends Process {
if (gdb instanceof Spawner) { if (gdb instanceof Spawner) {
Spawner gdbSpawner = (Spawner)gdb; Spawner gdbSpawner = (Spawner)gdb;
gdbSpawner.interrupt(); gdbSpawner.interrupt();
// Allow (5 secs) for the interrupt to propagate.
for (int i = 0; isRunning() && i < 5; i++) {
try {
java.lang.Thread.sleep(1000);
} catch (InterruptedException e) {
}
}
} else { } else {
// Try the exec-interrupt; this will be for "gdb --async" // Try the exec-interrupt; this will be for "gdb --async"
// CommandFactory factory = session.getCommandFactory(); // CommandFactory factory = session.getCommandFactory();

View file

@ -486,12 +486,6 @@ public class Target implements ICDITarget {
MISession mi = session.getMISession(); MISession mi = session.getMISession();
try { try {
mi.getMIInferior().interrupt(); mi.getMIInferior().interrupt();
for (int i = 0; isRunning() && i < 5; i++) {
try {
java.lang.Thread.sleep(2000);
} catch (InterruptedException e) {
}
}
if (isRunning()) { if (isRunning()) {
throw new CDIException("Unable to suspend target"); throw new CDIException("Unable to suspend target");
} }