package nl.ru.ai.projects.parrot.biomav.editor;
import nl.ru.ai.projects.parrot.fsm.FSMController;
private FSMController controller;
private Thread execThread = null;
controller = fsmController;
}
if (execThread == null) {
execThread = new Thread() {
@Override
try {
controller.execute();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
};
execThread.setDaemon(true);
execThread.start();
}
}
if (execThread != null) {
execThread.interrupt();
try {
execThread.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
execThread = null;
}
}
}