summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-09-21 12:15:46 +0200
committerSven Gothel <[email protected]>2012-09-21 12:15:46 +0200
commit4aa7541635e1fd8ae6a41f1d32d85828a18f7028 (patch)
treebfd53f0c6b6d1c55a58af36e59c7fe96a5c7c843 /src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java
parent39fcec48a6812b680a4eda0b9398310da6787295 (diff)
SingletonInstanceServerSocket: Add kill @ JVM Shutdown _and_ if normal unlock fails ; Added unit tests.
Diffstat (limited to 'src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java')
-rw-r--r--src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java b/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java
index f369941..c8a05ed 100644
--- a/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java
+++ b/src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java
@@ -79,6 +79,9 @@ public class SingletonInstanceFileLock extends SingletonInstance {
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
+ if(isLocked()) {
+ System.err.println("SLOCK "+System.currentTimeMillis()+" XXX "+getName()+" - Unlock @ JVM Shutdown");
+ }
unlock();
}
});