/[gzz]/gzz/gzz/util/Background.java
ViewVC logotype

Diff of /gzz/gzz/util/Background.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by tjl, Mon Jan 13 06:48:50 2003 UTC revision 1.5 by tjl, Sat Jan 18 15:18:21 2003 UTC
# Line 71  public class Background { Line 71  public class Background {
71          public void run() {          public void run() {
72              try {              try {
73                  while(true) {                  while(true) {
74                        Runnable r;
75                      synchronized(queue) {                      synchronized(queue) {
76                          Runnable r = (Runnable)queue.getAndRemoveLowest();                          r = (Runnable)queue.getAndRemoveLowest();
77                          if(r == null) {                          if(r == null) {
78                              queue.wait();                              queue.wait();
79                              continue;                              continue;
80                          }                          }
                         if(dbg) pa("BG: Going to run "+r);  
                         r.run();  
                         if(dbg) pa("BG: Did run "+r);  
81                      }                      }
82                        if(dbg) pa("BG: Going to run "+r);
83                        r.run();
84                        if(dbg) pa("BG: Did run "+r);
85                  }                  }
86              } catch(InterruptedException e) {              } catch(InterruptedException e) {
87                  pa("BG INTERRUPTED");                  pa("BG INTERRUPTED");

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26