From 8f79fbf000014f10f7c958ef03c656a4c383fc66 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sun, 28 Nov 2010 23:29:02 +0100
Subject: Animator: Run as non daemon like FPSAnimator. This seems to be the
users desired behavior and is more compliant with other APIs
---
src/jogl/classes/com/jogamp/opengl/util/Animator.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(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 311b4141f..fed55aeef 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
@@ -51,6 +51,12 @@ import javax.media.opengl.GLException;
calls to display()
are performed. After each drawable
has been redrawn, a brief pause is performed to avoid swamping the
CPU, unless {@link #setRunAsFastAsPossible} has been called.
+
+ *
+ * The Animator execution thread does not run as a daemon thread,
+ * so it is able to keep an application from terminating.
+ * Call {@link #stop() } to terminate the animation and it's execution thread.
+ *
*/
public class Animator extends AnimatorBase {
@@ -268,7 +274,6 @@ public class Animator extends AnimatorBase {
} else {
thread = new Thread(threadGroup, runnable, threadName);
}
- thread.setDaemon(true); // don't stop JVM from shutdown ..
thread.start();
finishLifecycleAction(waitForStartedCondition);
return true;
--
cgit v1.2.3