mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +02:00
Remove the delay of 10 seconds in Target.suspend() and put in MIInferior.interrupt()
This commit is contained in:
parent
30b5b45010
commit
b7fc69bdac
2 changed files with 7 additions and 6 deletions
|
@ -179,6 +179,13 @@ public class MIInferior extends Process {
|
|||
if (gdb instanceof Spawner) {
|
||||
Spawner gdbSpawner = (Spawner)gdb;
|
||||
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 {
|
||||
// Try the exec-interrupt; this will be for "gdb --async"
|
||||
// CommandFactory factory = session.getCommandFactory();
|
||||
|
|
|
@ -486,12 +486,6 @@ public class Target implements ICDITarget {
|
|||
MISession mi = session.getMISession();
|
||||
try {
|
||||
mi.getMIInferior().interrupt();
|
||||
for (int i = 0; isRunning() && i < 5; i++) {
|
||||
try {
|
||||
java.lang.Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
if (isRunning()) {
|
||||
throw new CDIException("Unable to suspend target");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue