From 7df49ff336ce1cfe3280de66c840681c21987bfb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 25 Sep 2011 04:24:13 +0200 Subject: SingletonInstanceServerSocket: composite thread name w/ leading original one --- .../jogamp/common/util/locks/SingletonInstanceServerSocket.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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 { -- cgit v1.2.3