X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FMessageQueue.java;h=b5f7fde97846448a50bf27fdddfac368d5d74c80;hb=4edeb03ae486109537497dfd4e3355ee505d356c;hp=54c2a9972f89b46574eb2a38a68e9ed8fbf13fd3;hpb=6242c991f365dbd67eba62ecfa5df769a83fcbc6;p=org.ibex.core.git diff --git a/src/org/xwt/MessageQueue.java b/src/org/xwt/MessageQueue.java index 54c2a99..b5f7fde 100644 --- a/src/org/xwt/MessageQueue.java +++ b/src/org/xwt/MessageQueue.java @@ -68,7 +68,7 @@ public class MessageQueue extends Thread { i--; continue; } - working = true; + if (!(e instanceof Thread)) working = true; currentlyPerforming = e; // for debugging purposes @@ -86,14 +86,11 @@ public class MessageQueue extends Thread { } catch (Throwable t) { if (Log.on) Log.log(this, "caught throwable in MessageQueue.run(); this should never happen"); - - /* FIXME: causes crashes on Win32 if (Log.on) Log.log(this, " currentlyPerforming == " + currentlyPerforming); if (Log.on) Log.log(this, " working == " + working); if (Log.on) Log.log(this, " lastfunc == " + lastfunc); if (Log.on) Log.log(this, " lastmessage == " + lastmessage); - */ - + if (Log.on) Log.log(this, t); if (Log.on) Log.log(this, "resuming MessageQueue loop"); } } @@ -127,15 +124,15 @@ public class MessageQueue extends Thread { what = "background thread"; } else { cx = Context.getContextForThread(MessageQueue.singleton); - what = Main.initializationComplete ? "trap" : "script"; + what = "script"; } - if (Log.on) Log.log(this, "WARNING: executing same " + what + " for " + (System.currentTimeMillis() - t) / 1000 + "s" + + if (Log.on) Log.log(this, "note: executing same " + what + " for " + (System.currentTimeMillis() - t) / 1000 + "s" + " at " + cx.interpreterSourceFile + ":" + cx.interpreterLine); } else { m = MessageQueue.currentlyPerforming; t = System.currentTimeMillis(); } - try { Thread.sleep(Main.initializationComplete ? 1000 : 15000); } catch (Exception e) { } + try { Thread.sleep(1000); } catch (Exception e) { } } } }