From cc5fb8d9f807089c5d119f3b56eed7d018a1dba2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 25 Nov 2012 13:50:40 +0100 Subject: FPSAnimator: Add note on deamon-thread and JVM shutdown behavior. --- src/jogl/classes/com/jogamp/opengl/util/Animator.java | 3 +-- src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java | 13 ++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) (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 20ba27c16..ddbc66fa3 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java @@ -56,8 +56,7 @@ import javax.media.opengl.GLAutoDrawable; * 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 { /** timeout in milliseconds, 15 frames @ 60Hz = 240ms, limiting {@link #finishLifecycleAction(Condition)} */ private static final long TO_WAIT_FOR_FINISH_LIFECYCLE_ACTION = 15*16; diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java index 73cc3a5f2..251792110 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java @@ -42,9 +42,16 @@ package com.jogamp.opengl.util; import java.util.*; import javax.media.opengl.*; -/** An Animator subclass which attempts to achieve a target -frames-per-second rate to avoid using all CPU time. The target FPS -is only an estimate and is not guaranteed. */ +/** + * An Animator subclass which attempts to achieve a target + * frames-per-second rate to avoid using all CPU time. The target FPS + * is only an estimate and is not guaranteed. + *

+ * 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 FPSAnimator extends AnimatorBase { private Timer timer = null; private TimerTask task = null; -- cgit v1.2.3