return isTerminated;
}
- public void terminate() {
+ public synchronized void terminate() {
+ // This method is synchronized to control a race condition between the
+ // UI thread that terminates the debugging session, and the slave
+ // thread that executes PHPLoop.run
+ if (isTerminated)
+ // Avoid terminating twice...
+ return;
phpDBGProxy.stop();
this.threads = new PHPThread[0];
isTerminated = true;