148 |
|
checkCancelled(task); |
149 |
|
} |
150 |
|
|
151 |
– |
|
151 |
|
/** |
152 |
|
* setting value causes get to return it |
153 |
|
*/ |
419 |
|
checkCancelled(task); |
420 |
|
} |
421 |
|
|
423 |
– |
|
422 |
|
/** |
423 |
|
* A runtime exception in task causes get to throw ExecutionException |
424 |
|
*/ |
457 |
|
} |
458 |
|
} |
459 |
|
|
462 |
– |
|
460 |
|
/** |
461 |
|
* Interrupting a waiting get causes it to throw InterruptedException |
462 |
|
*/ |
471 |
|
|
472 |
|
threadStarted.await(); |
473 |
|
t.interrupt(); |
474 |
< |
awaitTermination(t, MEDIUM_DELAY_MS); |
474 |
> |
awaitTermination(t); |
475 |
|
checkNotDone(task); |
476 |
|
} |
477 |
|
|
484 |
|
Thread t = newStartedThread(new CheckedInterruptedRunnable() { |
485 |
|
public void realRun() throws Exception { |
486 |
|
threadStarted.countDown(); |
487 |
< |
task.get(LONG_DELAY_MS, MILLISECONDS); |
487 |
> |
task.get(2*LONG_DELAY_MS, MILLISECONDS); |
488 |
|
}}); |
489 |
|
|
490 |
|
threadStarted.await(); |
491 |
|
t.interrupt(); |
492 |
< |
awaitTermination(t, MEDIUM_DELAY_MS); |
492 |
> |
awaitTermination(t); |
493 |
|
checkNotDone(task); |
494 |
|
} |
495 |
|
|