aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-03-27 00:13:16 +0100
committerSven Gothel <[email protected]>2011-03-27 00:13:16 +0100
commitf0581998c7398bc561df063bc1aa207a292d9881 (patch)
treee3248b9b319d8e6e5977af99df6feff30fc219c5 /src/jogl/classes/com/jogamp/opengl/util
parentc2c22f185fcebe8927bc5766cb5f24cba8312cb2 (diff)
FPSAnimator: Poor attempt to wait for threads EOL after pause/stop
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java6
1 files changed, 6 insertions, 0 deletions
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();
}