From 15d23e40badcf43a9af78de3bd699b7c74ec464a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 21 Apr 2012 20:23:21 +0200 Subject: Core/Animator: Force animator thread to be non-daemon. Even thought we didn't set the thread to be a daemon, if the [parent] thread instantiating the Animator the attribute would be passed along. --- src/jogl/classes/com/jogamp/opengl/util/Animator.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java index 6d508f227..20ba27c16 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java @@ -279,6 +279,11 @@ public class Animator extends AnimatorBase { } else { thread = new Thread(threadGroup, runnable, threadName); } + thread.setDaemon(false); // force to be non daemon, regardless of parent thread + if(DEBUG) { + final Thread ct = Thread.currentThread(); + System.err.println("Animator "+ct.getName()+"[daemon "+ct.isDaemon()+"]: starting "+thread.getName()+"[daemon "+thread.isDaemon()+"]"); + } thread.start(); finishLifecycleAction(waitForStartedCondition); return true; -- cgit v1.2.3