2003/09/23 08:24:59
[org.ibex.core.git] / src / org / xwt / ThreadMessage.java
index 61e8964..d028642 100644 (file)
@@ -25,7 +25,7 @@ public class ThreadMessage extends Thread implements Message {
     /** the ThreadMessage thread blocks on this before executing any JavaScript */
     Semaphore go = new Semaphore();
 
-    /** The MessageQueue (main) thread blocks on this while the ThreadMessage thread is running JavaScript code */
+    /** The Message.Q (main) thread blocks on this while the ThreadMessage thread is running JavaScript code */
     Semaphore done = new Semaphore();
 
     /** used to pool ThreadMessages that are not in use */
@@ -48,7 +48,7 @@ public class ThreadMessage extends Thread implements Message {
             }
         }
         ret.f = f;
-        MessageQueue.add(ret);
+        Message.Q.add(ret);
     }
 
     /** attempts to put this thread into the background to perform a blocking operation; returns false if unable to do so */
@@ -68,7 +68,7 @@ public class ThreadMessage extends Thread implements Message {
     /** re-enqueues this thread */
     public static void resumeThread() {
         ThreadMessage mythread = (ThreadMessage)Thread.currentThread();
-        MessageQueue.add(mythread);
+        Message.Q.add(mythread);
         mythread.setPriority(Thread.NORM_PRIORITY);
         mythread.go.block();        
     }
@@ -87,7 +87,7 @@ public class ThreadMessage extends Thread implements Message {
                 synchronized(waiting) {
                     if (waiting.size() > 0) {
                         f = (JS.Callable)waiting.remove(false);
-                        MessageQueue.add(this);
+                        Message.Q.add(this);
                     } else if (spare.size() < 10) {
                         spare.append(this);
                     } else {
@@ -104,7 +104,7 @@ public class ThreadMessage extends Thread implements Message {
         }
     }
 
-    /** this is invoked in the MessageQueue thread */
+    /** this is invoked in the Message.Q thread */
     public void perform() {
         go.release();
         done.block();