aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-09 20:08:11 +0100
committerSven Gothel <[email protected]>2010-11-09 20:08:11 +0100
commitdc2b838d9474c8f69e2db6a5ac1953a3b0c8c36a (patch)
treedf79451d7d6f5c5e5d155a84246ed4066e609850
parentf31eaef380b6a1e4d248b1bb78db5460b2f68f1b (diff)
The 'shared resource' thread must be a deamon, otherwise the application won't exit
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
index 8dd620c1f..5b5c07a61 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -83,9 +83,11 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
} catch (JogampRuntimeException jre) { /* n/a .. */ }
}
- // init shared resources ..
+ // Init shared resources via own thread
+ // Will be released via ShutdownHook
sharedResourcesRunner = new SharedResourcesRunner();
sharedResourcesThread = new Thread(sharedResourcesRunner, Thread.currentThread().getName()+"-SharedResourcesRunner");
+ sharedResourcesThread.setDaemon(true); // Allow JVM to exit, even if this one is running
sharedResourcesThread.start();
sharedResourcesRunner.waitUntilInitialized();