@Override
public void resume() {
isPaused = false;
- thread.notify();
+ synchronized (thread) {
+ thread.notify();
+ }
}
@Override
int index = 0;
while (!isInterrupted()) {
if (isPaused) {
- wait();
+ synchronized (thread) {
+ wait();
+ }
}
LedFrame frame = LedFrame.from(config);
updateFrame(frame, System.currentTimeMillis() - start, index);
Thread.sleep(20);
}
} catch (InterruptedException e) {
- e.printStackTrace();
+ // e.printStackTrace();
}
}
};