equal
deleted
inserted
replaced
195 } |
195 } |
196 public void run() { |
196 public void run() { |
197 synchronized (ready) { |
197 synchronized (ready) { |
198 // wait until WaitingThread about to wait for objC |
198 // wait until WaitingThread about to wait for objC |
199 thrsync.waitForSignal(); |
199 thrsync.waitForSignal(); |
200 // give chance to enter wait. |
200 |
201 goSleep(100); |
201 int retryCount = 0; |
|
202 while (waiter.getState() != Thread.State.WAITING |
|
203 && retryCount++ < 500) { |
|
204 goSleep(100); |
|
205 } |
202 checkBlockedObject(waiter, objC, null, Thread.State.WAITING); |
206 checkBlockedObject(waiter, objC, null, Thread.State.WAITING); |
203 |
207 |
204 synchronized (objC) { |
208 synchronized (objC) { |
205 objC.notify(); |
209 objC.notify(); |
206 } |
210 } |