home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / sun / misc / VMNotifierThread.class (.txt) < prev   
Encoding:
Java Class File  |  1998-04-23  |  756 b   |  47 lines

  1. package sun.misc;
  2.  
  3. class VMNotifierThread extends Thread {
  4.    int as_old;
  5.    int as_new;
  6.  
  7.    VMNotifierThread(String var1) {
  8.       super(var1);
  9.    }
  10.  
  11.    public void run() {
  12.       while(true) {
  13.          synchronized(this){}
  14.  
  15.          int var1;
  16.          int var2;
  17.          try {
  18.             while(this.as_old == 0) {
  19.                try {
  20.                   this.wait();
  21.                } catch (InterruptedException var6) {
  22.                }
  23.             }
  24.  
  25.             var1 = this.as_old;
  26.             var2 = this.as_new;
  27.             this.as_old = 0;
  28.          } catch (Throwable var7) {
  29.             throw var7;
  30.          }
  31.  
  32.          VM.asChange_otherthread(var1, var2);
  33.       }
  34.    }
  35.  
  36.    synchronized void enqueue(int var1, int var2) {
  37.       if (this.as_old == 0) {
  38.          this.as_old = var1;
  39.          this.as_new = var2;
  40.       } else {
  41.          this.as_new = var2;
  42.       }
  43.  
  44.       this.notify();
  45.    }
  46. }
  47.