v0.6.1: improved actor thread interrupt handling

This commit is contained in:
Evan Debenham 2017-06-22 17:23:59 -04:00
parent 2c54c53c54
commit 1757c2ae7d

View File

@ -231,13 +231,20 @@ public abstract class Actor implements Bundlable {
}
if (!doNext){
interrupted = false;
synchronized (Thread.currentThread()) {
interrupted = interrupted || Thread.interrupted();
if (interrupted){
current = null;
interrupted = false;
}
synchronized (GameScene.class){
//signals to the gamescene that actor processing is finished for now
GameScene.class.notify();
}
try {
Thread.currentThread().wait();
} catch (InterruptedException e) {