summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-25 04:24:13 +0200
committerSven Gothel <[email protected]>2011-09-25 04:24:13 +0200
commit7df49ff336ce1cfe3280de66c840681c21987bfb (patch)
treed7f1082bd1f6d15561f3516618db2fdc25bfc3b7
parent7d7b08a246a3173b204ecbb467f9d11d3f1c394f (diff)
SingletonInstanceServerSocket: composite thread name w/ leading original one
-rw-r--r--src/java/jogamp/common/util/locks/SingletonInstanceServerSocket.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/java/jogamp/common/util/locks/SingletonInstanceServerSocket.java b/src/java/jogamp/common/util/locks/SingletonInstanceServerSocket.java
index fe95ea7..e5ba012 100644
--- a/src/java/jogamp/common/util/locks/SingletonInstanceServerSocket.java
+++ b/src/java/jogamp/common/util/locks/SingletonInstanceServerSocket.java
@@ -131,7 +131,7 @@ public class SingletonInstanceServerSocket extends SingletonInstance {
public boolean start() {
if(alive) return true;
- Thread t = new Thread(this, "SingletonInstanceServerSocket: "+getName());
+ Thread t = new Thread(this);
t.setDaemon(true); // be a daemon, don't keep the JVM running
synchronized (syncOnStartStop) {
@@ -181,6 +181,13 @@ public class SingletonInstanceServerSocket extends SingletonInstance {
}
public void run() {
+ {
+ final Thread currentThread = Thread.currentThread();
+ currentThread.setName(currentThread.getName() + " - SingletonInstanceServerSocket: "+getName());
+ if(DEBUG) {
+ System.err.println(currentThread.getName()+" - started");
+ }
+ }
alive = false;
synchronized (syncOnStartStop) {
try {