From dc2b838d9474c8f69e2db6a5ac1953a3b0c8c36a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 9 Nov 2010 20:08:11 +0100 Subject: The 'shared resource' thread must be a deamon, otherwise the application won't exit --- .../classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3