1305 |
|
Callable<Boolean> waitingForGodot) { |
1306 |
|
for (long startTime = 0L;;) { |
1307 |
|
switch (thread.getState()) { |
1308 |
+ |
default: break; |
1309 |
|
case BLOCKED: case WAITING: case TIMED_WAITING: |
1310 |
|
try { |
1311 |
|
if (waitingForGodot == null || waitingForGodot.call()) |
1610 |
|
public String call() { throw new NullPointerException(); } |
1611 |
|
} |
1612 |
|
|
1612 |
– |
public class SmallPossiblyInterruptedRunnable extends CheckedRunnable { |
1613 |
– |
protected void realRun() { |
1614 |
– |
try { |
1615 |
– |
delay(SMALL_DELAY_MS); |
1616 |
– |
} catch (InterruptedException ok) {} |
1617 |
– |
} |
1618 |
– |
} |
1619 |
– |
|
1613 |
|
public Runnable possiblyInterruptedRunnable(final long timeoutMillis) { |
1614 |
|
return new CheckedRunnable() { |
1615 |
|
protected void realRun() { |