From f0581998c7398bc561df063bc1aa207a292d9881 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 27 Mar 2011 00:13:16 +0100 Subject: FPSAnimator: Poor attempt to wait for threads EOL after pause/stop --- src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java index 284e2bcc9..fc364b67a 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java @@ -173,6 +173,9 @@ public class FPSAnimator extends AnimatorBase { timer = null; } animThread = null; + try { + Thread.sleep(20); // ~ 1/60 hz wait, since we can't ctrl stopped threads + } catch (InterruptedException e) { } } finally { stateSync.unlock(); } @@ -191,6 +194,9 @@ public class FPSAnimator extends AnimatorBase { task = null; } animThread = null; + try { + Thread.sleep(20); // ~ 1/60 hz wait, since we can't ctrl stopped threads + } catch (InterruptedException e) { } } finally { stateSync.unlock(); } -- cgit v1.2.3