From 5cf995481463c684f2decd944ae2f0ef9310cfea Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Tue, 28 Feb 2012 01:44:13 +0000 Subject: [PATCH] Added a comment with what I think the taskQueue drain method is really doing... only simplified. I don't trust my eyes enough to make such a core change without co-verification. :) git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9218 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/app/Application.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/engine/src/core/com/jme3/app/Application.java b/engine/src/core/com/jme3/app/Application.java index eb29f5071..510072562 100644 --- a/engine/src/core/com/jme3/app/Application.java +++ b/engine/src/core/com/jme3/app/Application.java @@ -584,6 +584,17 @@ public class Application implements SystemListener { } task.invoke(); } while (((task = taskQueue.poll()) != null)); + + /* I think the above is really just doing this: + AppTask task; + while( (task = taskQueue.poll()) != null ) { + if (!task.isCancelled()) { + task.invoke(); + } + } + //...but it's hard to say for sure. It's so twisted + //up that I don't trust my eyes. -pspeed + */ if (speed == 0 || paused) return;