if(deltaNs > 0) {
synchronized(tasks) {
- try {
- tasks.wait(deltaMs, deltaNsRem);
- } catch (InterruptedException e) {
- e.printStackTrace();
+ if (inState(StandardExperimentStates.Running.class)) {
+ try {
+ tasks.wait(deltaMs, deltaNsRem);
+ } catch (InterruptedException e) {
+ LOGGER.warn("Dynamic experiment thread '" + this.getName() + "' (" + this.getClass().getName() + ") interrupted", e);
+ }
}
}
}
try {
tasks.wait(Integer.MAX_VALUE);
} catch (InterruptedException e) {
- e.printStackTrace();
+ LOGGER.warn("Dynamic experiment thread '" + this.getName() + "' (" + this.getClass().getName() + ") interrupted", e);
}
}
}