Added deadlock detection

This commit is contained in:
Light2
2013-11-04 13:12:54 +01:00
parent 7d45184168
commit d67b8bdc46
2 changed files with 241 additions and 0 deletions
+15
View File
@@ -34,6 +34,7 @@ import java.util.concurrent.ConcurrentHashMap;
import resources.common.RadialOptions;
import resources.common.ThreadMonitor;
import resources.objects.creature.CreatureObject;
import services.AttributeService;
import services.BuffService;
@@ -145,6 +146,20 @@ public class NGECore {
public void start() {
instance = this;
final ThreadMonitor deadlockDetector = new ThreadMonitor();
Thread deadlockMonitor = new Thread(new Runnable() {
@Override
public void run() {
try {
deadlockDetector.findDeadlock();
Thread.sleep(60000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
deadlockMonitor.start();
config = new Config();
config.setFilePath("nge.cfg");
if (!(config.loadConfigFile())) {