diff options
Diffstat (limited to 'src/demos/jrefract/JRefract.java')
-rwxr-xr-x | src/demos/jrefract/JRefract.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/demos/jrefract/JRefract.java b/src/demos/jrefract/JRefract.java index f562341..bc7606f 100755 --- a/src/demos/jrefract/JRefract.java +++ b/src/demos/jrefract/JRefract.java @@ -835,13 +835,6 @@ public class JRefract { } private void runExit() { - quit = true; - while (!animatorStopped) { - try { - Thread.sleep(1); - } catch (InterruptedException e) { - } - } // Note: calling System.exit() synchronously inside the draw, // reshape or init callbacks can lead to deadlocks on certain // platforms (in particular, X11) because the JAWT's locking @@ -849,6 +842,13 @@ public class JRefract { // the exit routine in another thread. new Thread(new Runnable() { public void run() { + quit = true; + while (!animatorStopped) { + try { + Thread.sleep(1); + } catch (InterruptedException e) { + } + } System.exit(0); } }).start(); @@ -879,6 +879,10 @@ public class JRefract { GLJPanel panel = (GLJPanel) iter.next(); panel.display(); } + try { + Thread.sleep(1); + } catch (InterruptedException e) { + } } } animatorStopped = true; @@ -1174,7 +1178,7 @@ public class JRefract { } try { - Thread.sleep(1000); + Thread.sleep(2000); } catch (InterruptedException e) { } @@ -1189,7 +1193,7 @@ public class JRefract { } try { - Thread.sleep(1000); + Thread.sleep(2000); } catch (InterruptedException e) { } } |