diff options
author | Sven Gothel <[email protected]> | 2012-09-21 12:15:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-09-21 12:15:46 +0200 |
commit | 4aa7541635e1fd8ae6a41f1d32d85828a18f7028 (patch) | |
tree | bfd53f0c6b6d1c55a58af36e59c7fe96a5c7c843 /src/java/jogamp/common/util/locks/SingletonInstanceFileLock.java | |
parent | 39fcec48a6812b680a4eda0b9398310da6787295 (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.java | 3 |
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(); } }); |