Threads: standardize names. Make sure they all start with "jME3".

experimental
shadowislord 10 years ago
parent a683fbb16c
commit 068047200e
  1. 2
      jme3-android/src/main/java/com/jme3/app/state/VideoRecorderAppState.java
  2. 5
      jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java
  3. 4
      jme3-core/src/main/java/com/jme3/system/NullContext.java
  4. 2
      jme3-desktop/src/main/java/com/jme3/app/state/VideoRecorderAppState.java
  5. 2
      jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java
  6. 2
      jme3-jogl/src/main/java/com/jme3/system/jogl/JoglOffscreenBuffer.java
  7. 4
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java
  8. 2
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java
  9. 2
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java
  10. 2
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java
  11. 2
      jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.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;
}

@ -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;

@ -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);
}

@ -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;
}

@ -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();

@ -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);
}

@ -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.

@ -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();

@ -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);
}

@ -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);
}

@ -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;
}

Loading…
Cancel
Save