test/hotspot/jtreg/vmTestbase/nsk/share/jdi/MonitorEventsDebuggee.java
changeset 59021 cfc7bb9a5a92
parent 49934 44839fbb20db
equal deleted inserted replaced
59020:aebd72de84b0 59021:cfc7bb9a5a92
    51         }
    51         }
    52 
    52 
    53         public void run() {
    53         public void run() {
    54             // wait when interrupted thread switches state to 'TIMED_WAITING'
    54             // wait when interrupted thread switches state to 'TIMED_WAITING'
    55             while ((threadToInterrupt.getState() != Thread.State.WAITING) && !exitedFromWait) {
    55             while ((threadToInterrupt.getState() != Thread.State.WAITING) && !exitedFromWait) {
    56                 yield();
    56                 Thread.yield();
    57             }
    57             }
    58 
    58 
    59             // threadToInterrupt 'spuriously' exited from wait()
    59             // threadToInterrupt 'spuriously' exited from wait()
    60             if(exitedFromWait)
    60             if(exitedFromWait)
    61                 return;
    61                 return;
   234         }
   234         }
   235 
   235 
   236         public void run() {
   236         public void run() {
   237             // wait when blocked thread switches state to 'BLOCKED'
   237             // wait when blocked thread switches state to 'BLOCKED'
   238             while (blockedThread.getState() != Thread.State.BLOCKED)
   238             while (blockedThread.getState() != Thread.State.BLOCKED)
   239                 yield();
   239                 Thread.yield();
   240 
   240 
   241             lockingThread.releaseLock();
   241             lockingThread.releaseLock();
   242         }
   242         }
   243     }
   243     }
   244 
   244