diff --git a/jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java b/jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java index c915164b3..a388ad612 100644 --- a/jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java +++ b/jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java @@ -74,7 +74,7 @@ public class VideoRecorderAppState extends AbstractAppState { public Thread newThread(Runnable r) { Thread th = new Thread(r); - th.setName("jME Video Processing Thread"); + th.setName("jME3 Video Processor"); th.setDaemon(true); return th; } diff --git a/jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java b/jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java index 346998e2e..c3ccea741 100644 --- a/jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java +++ b/jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java @@ -51,6 +51,9 @@ import static com.jme3.audio.openal.EFX.*; public class ALAudioRenderer implements AudioRenderer, Runnable { private static final Logger logger = Logger.getLogger(ALAudioRenderer.class.getName()); + + private static final String THREAD_NAME = "jME3 Audio Decoder"; + private final NativeObjectManager objManager = new NativeObjectManager(); // When multiplied by STREAMING_BUFFER_COUNT, will equal 44100 * 2 * 2 // which is exactly 1 second of audio. @@ -75,7 +78,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable { // Fill streaming sources every 50 ms private static final float UPDATE_RATE = 0.05f; - private final Thread decoderThread = new Thread(this, "jME3 Audio Decoding Thread"); + private final Thread decoderThread = new Thread(this, THREAD_NAME); private final Object threadLock = new Object(); private final AL al; diff --git a/jme3-core/src/main/java/com/jme3/system/NullContext.java b/jme3-core/src/main/java/com/jme3/system/NullContext.java index f7d4b3d5a..41204e6c9 100644 --- a/jme3-core/src/main/java/com/jme3/system/NullContext.java +++ b/jme3-core/src/main/java/com/jme3/system/NullContext.java @@ -46,6 +46,8 @@ public class NullContext implements JmeContext, Runnable { protected static final Logger logger = Logger.getLogger(NullContext.class.getName()); + protected static final String THREAD_NAME = "jME3 Headless Main"; + protected AtomicBoolean created = new AtomicBoolean(false); protected AtomicBoolean needClose = new AtomicBoolean(false); protected final Object createdLock = new Object(); @@ -150,7 +152,7 @@ public class NullContext implements JmeContext, Runnable { return; } - new Thread(this, "Headless Application Thread").start(); + new Thread(this, THREAD_NAME).start(); if (waitFor) waitFor(true); } diff --git a/jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java b/jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java index 9466b4a50..ccaecc580 100644 --- a/jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java +++ b/jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java @@ -71,7 +71,7 @@ public class VideoRecorderAppState extends AbstractAppState { public Thread newThread(Runnable r) { Thread th = new Thread(r); - th.setName("jME Video Processing Thread"); + th.setName("jME3 Video Processor"); th.setDaemon(true); return th; } diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java index eca36d84b..8861904b8 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java @@ -55,6 +55,8 @@ public abstract class JoglContext implements JmeContext { private static final Logger logger = Logger.getLogger(JoglContext.class.getName()); + protected static final String THREAD_NAME = "jME3 Main"; + protected AtomicBoolean created = new AtomicBoolean(false); protected AtomicBoolean renderable = new AtomicBoolean(false); protected final Object createdLock = new Object(); diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglOffscreenBuffer.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglOffscreenBuffer.java index 505808878..e2ad1f79a 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglOffscreenBuffer.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglOffscreenBuffer.java @@ -146,7 +146,7 @@ public class JoglOffscreenBuffer extends JoglContext implements Runnable { return; } - new Thread(this, "JOGL Renderer Thread").start(); + new Thread(this, THREAD_NAME).start(); if (waitFor) { waitFor(true); } diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java index f1fcc34a2..2452e470b 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java @@ -96,7 +96,7 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex canvas.setFocusable(true); canvas.setIgnoreRepaint(true); - renderThread = new Thread(LwjglCanvas.this, "LWJGL Renderer Thread"); + renderThread = new Thread(LwjglCanvas.this, THREAD_NAME); renderThread.start(); }else if (needClose.get()){ return; @@ -162,7 +162,7 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex if (renderThread == null){ logger.log(Level.FINE, "MAIN: Creating OGL thread."); - renderThread = new Thread(LwjglCanvas.this, "LWJGL Renderer Thread"); + renderThread = new Thread(LwjglCanvas.this, THREAD_NAME); renderThread.start(); } // do not do anything. diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java index e318d24a2..1286323ef 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java @@ -67,6 +67,8 @@ public abstract class LwjglContext implements JmeContext { private static final Logger logger = Logger.getLogger(LwjglContext.class.getName()); + protected static final String THREAD_NAME = "jME3 Main"; + protected AtomicBoolean created = new AtomicBoolean(false); protected AtomicBoolean renderable = new AtomicBoolean(false); protected final Object createdLock = new Object(); diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java index 4ecfc9a49..853e02933 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java @@ -166,7 +166,7 @@ public class LwjglDisplay extends LwjglAbstractDisplay { return; } - new Thread(this, "LWJGL Renderer Thread").start(); + new Thread(this, THREAD_NAME).start(); if (waitFor) waitFor(true); } diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java index efdb5dfdf..b06db1b29 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java +++ b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java @@ -170,7 +170,7 @@ public class LwjglOffscreenBuffer extends LwjglContext implements Runnable { return; } - new Thread(this, "LWJGL Renderer Thread").start(); + new Thread(this, THREAD_NAME).start(); if (waitFor) waitFor(true); } diff --git a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java index f52eaee01..8ad2425ad 100644 --- a/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java +++ b/jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java @@ -137,7 +137,7 @@ public class TerrainLodControl extends AbstractControl { return Executors.newSingleThreadExecutor(new ThreadFactory() { public Thread newThread(Runnable r) { Thread th = new Thread(r); - th.setName("jME Terrain Thread"); + th.setName("jME3 Terrain Thread"); th.setDaemon(true); return th; }