v0.6.1: improved actor thread interrupt handling
This commit is contained in:
parent
2c54c53c54
commit
1757c2ae7d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user